Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1714)

Unified Diff: content/renderer/in_process_renderer_thread.cc

Issue 1900513003: Try to diagnose blink reinitialisation in WebView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make it actually compile (missing headers) Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/in_process_renderer_thread.cc
diff --git a/content/renderer/in_process_renderer_thread.cc b/content/renderer/in_process_renderer_thread.cc
index a2c8c5d4459b8e316f009617f03bbb87e9dccac5..b8770cefddd5b432bee85f86ebf8027450bfbc29 100644
--- a/content/renderer/in_process_renderer_thread.cc
+++ b/content/renderer/in_process_renderer_thread.cc
@@ -4,7 +4,9 @@
#include "content/renderer/in_process_renderer_thread.h"
+#include "base/command_line.h"
#include "build/build_config.h"
+#include "content/public/common/content_switches.h"
#include "content/renderer/render_process.h"
#include "content/renderer/render_process_impl.h"
#include "content/renderer/render_thread_impl.h"
@@ -21,6 +23,13 @@ InProcessRendererThread::InProcessRendererThread(
}
InProcessRendererThread::~InProcessRendererThread() {
+#if defined(OS_ANDROID)
+ // Don't allow the render thread to be shut down in single process mode on
+ // Android. Temporary CHECK() to debug http://crbug.com/514141
+ CHECK(!base::CommandLine::ForCurrentProcess()->HasSwitch(
johnme 2016/04/19 14:25:10 This check triggers frequently in content_browsert
+ switches::kSingleProcess));
+#endif
+
Stop();
}
@@ -31,12 +40,23 @@ void InProcessRendererThread::Init() {
// will not change the thread name kept in Java VM.
#if defined(OS_ANDROID)
base::android::AttachCurrentThreadWithName(thread_name());
+ // Make sure we aren't somehow reinitialising the inprocess renderer thread on
+ // Android. Temporary CHECK() to debug http://crbug.com/514141
+ CHECK(!base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kSingleProcess) || !render_process_);
#endif
render_process_.reset(new RenderProcessImpl());
RenderThreadImpl::Create(params_);
}
void InProcessRendererThread::CleanUp() {
+#if defined(OS_ANDROID)
+ // Don't allow the render thread to be shut down in single process mode on
+ // Android. Temporary CHECK() to debug http://crbug.com/514141
+ CHECK(!base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kSingleProcess));
+#endif
+
render_process_.reset();
// It's a little lame to manually set this flag. But the single process
« no previous file with comments | « no previous file | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698