Changeset 70347 in webkit
- Timestamp:
- Oct 22, 2010 2:58:29 PM (14 years ago)
- Location:
- trunk/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r70346 r70347 1 2010-10-22 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Adam Roben. 4 5 Fix assert when a NetscapePluginModule loses its last NetscapePlugin. 6 https://bugs.webkit.org/show_bug.cgi?id=48155 7 8 (The assert in question is ASSERT(pluginModuleIndex != notFound) in 9 NetscapePluginModule::shutdown()). 10 11 * WebProcess/Plugins/Netscape/NetscapePluginModule.cpp: 12 (WebKit::NetscapePluginModule::pluginCreated): 13 If we didn't have any live plug-ins, load the plug-in module. 14 15 (WebKit::NetscapePluginModule::pluginDestroyed): 16 If this was the last plug-in, unload the plug-in module. 17 18 (WebKit::NetscapePluginModule::shutdown): 19 Set m_isInitialized to false. 20 21 (WebKit::NetscapePluginModule::load): 22 Don't do anything if the plug-in module has already been initialized. 23 24 (WebKit::NetscapePluginModule::unload): 25 Assert that we're not initialized. 26 27 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: 28 (WebKit::NetscapePlugin::platformPostInitialize): 29 Assert that we successfully created the window. 30 1 31 2010-10-22 Jessie Berlin <jberlin@apple.com> 2 32 -
trunk/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginModule.cpp
r66025 r70347 54 54 void NetscapePluginModule::pluginCreated() 55 55 { 56 if (!m_pluginCount) { 57 // Load the plug-in module if necessary. 58 load(); 59 } 60 56 61 m_pluginCount++; 57 62 } … … 62 67 m_pluginCount--; 63 68 64 if (!m_pluginCount) 69 if (!m_pluginCount) { 65 70 shutdown(); 71 unload(); 72 } 66 73 } 67 74 … … 71 78 72 79 m_shutdownProcPtr(); 80 81 m_isInitialized = false; 73 82 74 83 size_t pluginModuleIndex = initializedNetscapePluginModules().find(this); … … 99 108 bool NetscapePluginModule::load() 100 109 { 110 if (m_isInitialized) { 111 ASSERT(initializedNetscapePluginModules().find(this) != notFound); 112 return true; 113 } 114 101 115 if (!tryLoad()) { 102 116 unload(); … … 149 163 void NetscapePluginModule::unload() 150 164 { 165 ASSERT(!m_isInitialized); 166 151 167 m_module = 0; 152 168 } -
trunk/WebKit2/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm
r70265 r70347 133 133 Rect bounds = { 0, 0, 0, 0 }; 134 134 CreateNewWindow(kDocumentWindowClass, 0, &bounds, reinterpret_cast<WindowRef*>(&m_npCGContext.window)); 135 ASSERT(m_npCGContext.window); 135 136 136 137 // FIXME: Disable the backing store.
Note: See TracChangeset
for help on using the changeset viewer.