Changeset 181864 in webkit
- Timestamp:
- Mar 23, 2015, 1:34:52 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/platform/mac-wk2/TestExpectations (modified) (1 diff)
-
Source/WebKit2/ChangeLog (modified) (1 diff)
-
Source/WebKit2/Shared/Plugins/NPObjectMessageReceiver.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r181861 r181864 1 2015-03-23 Anders Carlsson <andersca@apple.com> 2 3 Make platform/mac-wk2/plugins/destroy-during-async-npp-new.html work again 4 https://bugs.webkit.org/show_bug.cgi?id=133692 5 rdar://problem/17255947 6 7 Reviewed by Alexey Proskuryakov. 8 9 * platform/mac-wk2/TestExpectations: 10 Unskip test. 11 1 12 2015-03-23 Alexey Proskuryakov <ap@apple.com> 2 13 -
trunk/LayoutTests/platform/mac-wk2/TestExpectations
r181760 r181864 241 241 webkit.org/b/93980 http/tests/appcache/load-from-appcache-defer-resume-crash.html [ Skip ] 242 242 243 webkit.org/b/133692 platform/mac-wk2/plugins/destroy-during-async-npp-new.html [ Skip ]244 245 243 webkit.org/b/136554 platform/mac-wk2/tiled-drawing/scrolling/frames/frameset-nested-frame-scrollability.html [ Pass Failure ] 246 244 webkit.org/b/139901 platform/mac-wk2/tiled-drawing/scrolling/frames/frameset-frame-scrollability.html [ Pass Failure ] -
trunk/Source/WebKit2/ChangeLog
r181859 r181864 1 2015-03-23 Anders Carlsson <andersca@apple.com> 2 3 Make platform/mac-wk2/plugins/destroy-during-async-npp-new.html work again. 4 https://bugs.webkit.org/show_bug.cgi?id=133692 5 rdar://problem/17255947 6 7 Reviewed by Alexey Proskuryakov. 8 9 Add plug-in destruction protectors around message receiver code that can call out to NPObjects or JavaScript 10 where we need the plug-in to stay around after the call. 11 12 * Shared/Plugins/NPObjectMessageReceiver.cpp: 13 (WebKit::NPObjectMessageReceiver::invoke): 14 (WebKit::NPObjectMessageReceiver::invokeDefault): 15 (WebKit::NPObjectMessageReceiver::getProperty): 16 (WebKit::NPObjectMessageReceiver::setProperty): 17 (WebKit::NPObjectMessageReceiver::construct): 18 1 19 2015-03-23 Anders Carlsson <andersca@apple.com> 2 20 -
trunk/Source/WebKit2/Shared/Plugins/NPObjectMessageReceiver.cpp
r156688 r181864 33 33 #include "NPRuntimeUtilities.h" 34 34 #include "NPVariantData.h" 35 #include "Plugin.h" 36 #include "PluginController.h" 35 37 36 38 namespace WebKit { … … 81 83 VOID_TO_NPVARIANT(result); 82 84 85 PluginController::PluginDestructionProtector protector(m_plugin->controller()); 86 83 87 returnValue = m_npObject->_class->invoke(m_npObject, methodNameData.createNPIdentifier(), arguments.data(), arguments.size(), &result); 84 88 if (returnValue) { … … 109 113 VOID_TO_NPVARIANT(result); 110 114 115 PluginController::PluginDestructionProtector protector(m_plugin->controller()); 116 111 117 returnValue = m_npObject->_class->invokeDefault(m_npObject, arguments.data(), arguments.size(), &result); 112 118 if (returnValue) { … … 143 149 VOID_TO_NPVARIANT(result); 144 150 151 PluginController::PluginDestructionProtector protector(m_plugin->controller()); 152 145 153 returnValue = m_npObject->_class->getProperty(m_npObject, propertyNameData.createNPIdentifier(), &result); 146 154 if (!returnValue) 147 155 return; 148 156 149 // Convert the NPVariant to an NPVariantData. 157 150 158 resultData = m_npRemoteObjectMap->npVariantToNPVariantData(result, m_plugin); 151 159 152 // And release the result.153 160 releaseNPVariantValue(&result); 154 161 } … … 163 170 NPVariant propertyValue = m_npRemoteObjectMap->npVariantDataToNPVariant(propertyValueData, m_plugin); 164 171 165 // Set the property. 172 PluginController::PluginDestructionProtector protector(m_plugin->controller()); 173 166 174 returnValue = m_npObject->_class->setProperty(m_npObject, propertyNameData.createNPIdentifier(), &propertyValue); 167 175 168 // And release the value.169 176 releaseNPVariantValue(&propertyValue); 170 177 } … … 214 221 VOID_TO_NPVARIANT(result); 215 222 223 PluginController::PluginDestructionProtector protector(m_plugin->controller()); 224 216 225 returnValue = m_npObject->_class->construct(m_npObject, arguments.data(), arguments.size(), &result); 217 if (returnValue) { 218 // Convert the NPVariant to an NPVariantData. 226 if (returnValue) 219 227 resultData = m_npRemoteObjectMap->npVariantToNPVariantData(result, m_plugin); 220 } 221 222 // Release all arguments. 228 223 229 for (size_t i = 0; i < argumentsData.size(); ++i) 224 230 releaseNPVariantValue(&arguments[i]); 225 231 226 // And release the result.227 232 releaseNPVariantValue(&result); 228 233 }
Note:
See TracChangeset
for help on using the changeset viewer.