diff options
author | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-11 21:10:25 +0000 |
---|---|---|
committer | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-11 21:10:25 +0000 |
commit | c18388fbdee1812b724d90b7736291502e6dd68f (patch) | |
tree | 6c6c3e74cc2e815330f9843f3a4aa23b8d0a1944 /webkit/glue/plugins/plugin_lib.cc | |
parent | 4880161eeb57ce0911dc2b2c7d9b8f374d5e7f4f (diff) | |
download | chromium_src-c18388fbdee1812b724d90b7736291502e6dd68f.zip chromium_src-c18388fbdee1812b724d90b7736291502e6dd68f.tar.gz chromium_src-c18388fbdee1812b724d90b7736291502e6dd68f.tar.bz2 |
Don't attempt to unload Silverlight on the Mac
BUG=28131
TEST=covered by buildbot (no user-visible effect since the crash happens after the pages are closed)
Review URL: http://codereview.chromium.org/597027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38811 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/plugins/plugin_lib.cc')
-rw-r--r-- | webkit/glue/plugins/plugin_lib.cc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/webkit/glue/plugins/plugin_lib.cc b/webkit/glue/plugins/plugin_lib.cc index 2768fc7..d63045a 100644 --- a/webkit/glue/plugins/plugin_lib.cc +++ b/webkit/glue/plugins/plugin_lib.cc @@ -64,7 +64,8 @@ PluginLib::PluginLib(const WebPluginInfo& info, library_(0), initialized_(false), saved_data_(0), - instance_count_(0) { + instance_count_(0), + skip_unload_(false) { StatsCounter(kPluginLibrariesLoadedCounter).Increment(); memset((void*)&plugin_funcs_, 0, sizeof(plugin_funcs_)); g_loaded_libs->push_back(this); @@ -127,6 +128,10 @@ void PluginLib::NP_Shutdown(void) { entry_points_.np_shutdown(); } +void PluginLib::PreventLibraryUnload() { + skip_unload_ = true; +} + PluginInstance* PluginLib::CreateInstance(const std::string& mime_type) { PluginInstance* new_instance = new PluginInstance(this, mime_type); instance_count_++; @@ -259,11 +264,13 @@ void PluginLib::Unload() { if (defer_unload) { FreePluginLibraryTask* free_library_task = - new FreePluginLibraryTask(library_, entry_points_.np_shutdown); + new FreePluginLibraryTask(skip_unload_ ? NULL : library_, + entry_points_.np_shutdown); MessageLoop::current()->PostTask(FROM_HERE, free_library_task); } else { Shutdown(); - base::UnloadNativeLibrary(library_); + if (!skip_unload_) + base::UnloadNativeLibrary(library_); } library_ = 0; |