From ce79d8512c33e5993d7d92b0d7b017b864f62bf3 Mon Sep 17 00:00:00 2001 From: "dcheng@chromium.org" Date: Mon, 22 Apr 2013 22:44:41 +0000 Subject: Add Shutdown() helper to ChildThread and move all destructor logic. r185551 changed the ordering of events in scoped_ptr::reset(); specifically, callers can no longer rely on get() to return the old value of the stored pointer during a reset(). This causes issues such as http://crbug.com/232981. In order to break the dependency on the value of main_thread_.get() during main_thread_.reset(), destruction of ChildThread has been split into two parts. BUG=233761 Review URL: https://codereview.chromium.org/13878020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195628 0039d316-1c4b-4281-b951-d872f2087c98 --- content/ppapi_plugin/ppapi_thread.cc | 3 +++ content/ppapi_plugin/ppapi_thread.h | 1 + 2 files changed, 4 insertions(+) (limited to 'content/ppapi_plugin') diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc index 006f28c..f321d59 100644 --- a/content/ppapi_plugin/ppapi_thread.cc +++ b/content/ppapi_plugin/ppapi_thread.cc @@ -113,6 +113,9 @@ PpapiThread::PpapiThread(const CommandLine& command_line, bool is_broker) } PpapiThread::~PpapiThread() { +} + +void PpapiThread::Shutdown() { ppapi::proxy::PluginGlobals::Get()->set_plugin_proxy_delegate(NULL); if (plugin_entry_points_.shutdown_module) plugin_entry_points_.shutdown_module(); diff --git a/content/ppapi_plugin/ppapi_thread.h b/content/ppapi_plugin/ppapi_thread.h index 5203ce1..7faff6b 100644 --- a/content/ppapi_plugin/ppapi_thread.h +++ b/content/ppapi_plugin/ppapi_thread.h @@ -47,6 +47,7 @@ class PpapiThread : public ChildThread, public: PpapiThread(const CommandLine& command_line, bool is_broker); virtual ~PpapiThread(); + virtual void Shutdown() OVERRIDE; private: // Make sure the enum list in tools/histogram/histograms.xml is updated with -- cgit v1.1