diff options
author | dcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-22 22:44:41 +0000 |
---|---|---|
committer | dcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-22 22:44:41 +0000 |
commit | ce79d8512c33e5993d7d92b0d7b017b864f62bf3 (patch) | |
tree | adbe9a51124047844dfde716238796dc7036a0ae /content/ppapi_plugin | |
parent | 78852f3791721c332ad6857689a18a100cff43c6 (diff) | |
download | chromium_src-ce79d8512c33e5993d7d92b0d7b017b864f62bf3.zip chromium_src-ce79d8512c33e5993d7d92b0d7b017b864f62bf3.tar.gz chromium_src-ce79d8512c33e5993d7d92b0d7b017b864f62bf3.tar.bz2 |
Add Shutdown() helper to ChildThread and move all destructor logic.
r185551 changed the ordering of events in scoped_ptr<T>::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
Diffstat (limited to 'content/ppapi_plugin')
-rw-r--r-- | content/ppapi_plugin/ppapi_thread.cc | 3 | ||||
-rw-r--r-- | content/ppapi_plugin/ppapi_thread.h | 1 |
2 files changed, 4 insertions, 0 deletions
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 |