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

Unified Diff: content/renderer/render_thread_impl.h

Issue 583043005: Pending tasks in a message loop should be deleted before shutting down Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
Index: content/renderer/render_thread_impl.h
diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h
index 954c074abe3dc4bcbb26f344abc0fde2ca94a6d7..12d1ee065983f643b027ca3ad6dead81808231fb 100644
--- a/content/renderer/render_thread_impl.h
+++ b/content/renderer/render_thread_impl.h
@@ -120,6 +120,8 @@ class CONTENT_EXPORT RenderThreadImpl : public RenderThread,
RenderThreadImpl();
// Constructor that's used when running in single process mode.
explicit RenderThreadImpl(const std::string& channel_name);
+ // Constructor that's used in RendererMain.
+ explicit RenderThreadImpl(scoped_ptr<base::MessageLoop> main_message_loop);
virtual ~RenderThreadImpl();
virtual void Shutdown() OVERRIDE;
@@ -523,6 +525,11 @@ class CONTENT_EXPORT RenderThreadImpl : public RenderThread,
// GpuChannelHostFactory methods.
scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_;
+ // The message loop of the renderer main thread.
+ // This message loop should be destructed before the RenderThreadImpl
+ // shuts down Blink.
+ scoped_ptr<base::MessageLoop> main_message_loop_;
+
// A lazily initiated thread on which file operations are run.
scoped_ptr<base::Thread> file_thread_;

Powered by Google App Engine
This is Rietveld 408576698