[M120 Migration] Error page isolation & navigation. 27/304527/4
authorvenu.musham <venu.musham@samsung.com>
Thu, 18 Jan 2024 11:00:21 +0000 (16:30 +0530)
committerBot Blink <blinkbot@samsung.com>
Tue, 20 Feb 2024 23:14:03 +0000 (23:14 +0000)
Disable error page isolation for EFL port

Use the current SiteInstance for error page navigation

Reference: https://review.tizen.org/gerrit/292258

Change-Id: I5a4d59f096a8814bd35d4ef57b4244105c53b457
Signed-off-by: venu.musham <venu.musham@samsung.com>
content/browser/renderer_host/render_frame_host_manager.cc
tizen_src/ewk/efl_integration/content_browser_client_efl.h

index 45ce7cf..056ef0a 100644 (file)
@@ -2601,6 +2601,13 @@ RenderFrameHostManager::GetSiteInstanceForNavigation(
 
   SiteInstanceImpl* current_instance = render_frame_host_->GetSiteInstance();
 
+#if BUILDFLAG(IS_TIZEN)
+  // Using the current SiteInstance ensures that a speculative RenderFrameHost
+  // is not created during error page navigations.
+  if (current_instance->GetSiteURL() == GURL(kUnreachableWebDataURL))
+    return current_instance;
+#endif
+
   // Determine if we need a new BrowsingInstance for this entry.  If true, this
   // implies that it will get a new SiteInstance (and likely process), and that
   // other tabs in the current BrowsingInstance will be unable to script it.
index 53d6635..cceb91c 100644 (file)
@@ -66,6 +66,7 @@ class ContentBrowserClientEfl : public ContentBrowserClient {
   bool ShouldUseMobileFlingCurve() override { return IsMobileProfile(); }
   void AppendExtraCommandLineSwitches(base::CommandLine* command_line,
                                       int child_process_id) override;
+  bool ShouldIsolateErrorPage(bool in_main_frame) override { return false; }
   bool CanCreateWindow(RenderFrameHost* opener,
                        const GURL& opener_url,
                        const GURL& opener_top_level_frame_url,