// code in-process, the security invariant cannot be enforced, therefore it
// should be skipped in that case.
if (!webui_bindings.empty() &&
+#if BUILDFLAG(IS_TIZEN)
+ !base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kSingleRendererProcess) &&
+#endif // BUILDFLAG(IS_TIZEN)
!RenderProcessHost::run_renderer_in_process()) {
ProcessLock process_lock = GetProcess()->GetProcessLock();
if (!process_lock.is_locked_to_site() ||
}
});
if (non_empty_frame_count > 0 &&
+#if BUILDFLAG(IS_TIZEN)
+ !base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kSingleRendererProcess) &&
+#endif // BUILDFLAG(IS_TIZEN)
!base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kSingleProcess)) {
return;
BrowserContext* browser_context =
isolation_context.browser_or_resource_context().ToBrowserContext();
DCHECK(browser_context);
- if (run_renderer_in_process()) {
+ if (run_renderer_in_process()
+#if BUILDFLAG(IS_TIZEN)
+ || base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kSingleRendererProcess)
+#endif
+ ) {
DCHECK_EQ(host->GetBrowserContext(), browser_context)
<< " Single-process mode does not support multiple browser contexts.";
return true;
bool RenderProcessHost::ShouldTryToUseExistingProcessHost(
BrowserContext* browser_context,
const GURL& url) {
- if (run_renderer_in_process())
+ if (run_renderer_in_process()
+#if BUILDFLAG(IS_TIZEN)
+ || base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kSingleRendererProcess)
+#endif
+ ) {
return true;
+ }
// NOTE: Sometimes it's necessary to create more render processes than
// GetMaxRendererProcessCount(), for instance when we want to create
}
}
+#if BUILDFLAG(IS_TIZEN)
+ // As long as the browser context is same, we can re-use existing renderers.
+ // But for cases like profile change or incognito mode, a new browser context
+ // is created. In such cases, the new browser context and existing render
+ // process host have different storage partitions. For such scenarios, we
+ // allow the creation of new RenderProcessHost to adhere to the current
+ // Chromium design.
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kSingleRendererProcess)) {
+ if (render_process_host &&
+ !render_process_host->InSameStoragePartition(
+ browser_context->GetStoragePartition(site_instance, false))) {
+ render_process_host = nullptr;
+ }
+ }
+#endif
+
// If we found a process to reuse, double-check that it is suitable for
// |site_instance|. For example, if the SiteInfo for |site_instance| requires
// a dedicated process, we should never pick a process used by, or locked to,
#include "content/public/browser/render_process_host.h"
#include "content/public/common/content_client.h"
#include "content/public/common/content_features.h"
+#if BUILDFLAG(IS_TIZEN)
+#include "content/public/common/content_switches.h"
+#endif // BUILDFLAG(IS_TIZEN)
namespace content {
// got too many processes. See also ShouldTryToUseExistingProcessHost in
// this file.
if (RenderProcessHost::run_renderer_in_process() ||
+#if BUILDFLAG(IS_TIZEN)
+ base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kSingleRendererProcess) ||
+#endif
RenderProcessHostImpl::GetProcessCountForLimit() >=
RenderProcessHostImpl::GetMaxRendererProcessCount()) {
return;
// Don't lock to origin in --single-process mode, since this mode puts
// cross-site pages into the same process. Note that this also covers the
// single-process mode in Android Webview.
- if (RenderProcessHost::run_renderer_in_process())
+ if (RenderProcessHost::run_renderer_in_process()
+#if BUILDFLAG(IS_TIZEN)
+ || base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kSingleRendererProcess)
+#endif
+ ) {
return false;
+ }
if (!RequiresDedicatedProcess(isolation_context))
return false;