Changeset 135751 in webkit
- Timestamp:
- Nov 26, 2012, 12:02:10 PM (13 years ago)
- Location:
- branches/safari-536.28-branch
- Files:
-
- 12 edited
- 3 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-536.28-branch/LayoutTests/ChangeLog
r135072 r135751 1 2012-11-26 Lucas Forschler <lforschler@apple.com> 2 3 Merge r132713 4 5 2012-10-26 Anders Carlsson <andersca@apple.com> 6 7 Crash when making NPRuntime calls with a null NPP pointer 8 https://bugs.webkit.org/show_bug.cgi?id=100569 9 10 Reviewed by Darin Adler. 11 12 Add new tests. 13 14 * plugins/npruntime/npruntime-calls-with-null-npp-expected.txt: Added. 15 * plugins/npruntime/npruntime-calls-with-null-npp.html: Added. 16 1 17 2012-11-18 Simon Fraser <simon.fraser@apple.com> 2 18 -
branches/safari-536.28-branch/Source/WebKit2/ChangeLog
r135007 r135751 1 2012-11-26 Lucas Forschler <lforschler@apple.com> 2 3 Merge r132713 4 5 2012-10-26 Anders Carlsson <andersca@apple.com> 6 7 Crash when making NPRuntime calls with a null NPP pointer 8 https://bugs.webkit.org/show_bug.cgi?id=100569 9 <rdar://problem/11726426> 10 <rdar://problem/12352836> 11 12 Reviewed by Darin Adler. 13 14 Finally bite the bullet and remove the assertion from NetscapePlugin::fromNPP. The WebKit1 equivalent of this 15 function used to return the plug-in currently being initialized in NPP_New, but we've never done that in WebKit2 16 and it has never been necessary. The crashes fixed here are not from calls underneath NPP_New so fixing it wouldn't 17 do us any good anyway. 18 19 Also, make the PluginDestructionProtector handle a null plug-in gracefully. 20 21 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: 22 (WebKit::PluginDestructionProtector::PluginDestructionProtector): 23 (PluginDestructionProtector): 24 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: 25 (WebKit::NetscapePlugin::fromNPP): 26 1 27 2012-11-16 Lucas Forschler <lforschler@apple.com> 2 28 -
branches/safari-536.28-branch/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp
r112950 r135751 50 50 public: 51 51 explicit PluginDestructionProtector(NetscapePlugin* plugin) 52 : m_protector(static_cast<Plugin*>(plugin)->controller())53 52 { 53 if (plugin) 54 m_protector = adoptPtr(new PluginController::PluginDestructionProtector(static_cast<Plugin*>(plugin)->controller())); 54 55 } 55 56 56 57 private: 57 PluginController::PluginDestructionProtectorm_protector;58 OwnPtr<PluginController::PluginDestructionProtector> m_protector; 58 59 }; 59 60 -
branches/safari-536.28-branch/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp
r127522 r135751 112 112 PassRefPtr<NetscapePlugin> NetscapePlugin::fromNPP(NPP npp) 113 113 { 114 if (npp) 115 return static_cast<NetscapePlugin*>(npp->ndata); 116 117 // FIXME: Return the current NetscapePlugin here. 118 ASSERT_NOT_REACHED(); 119 return 0; 114 if (!npp) 115 return 0; 116 117 return static_cast<NetscapePlugin*>(npp->ndata); 120 118 } 121 119 -
branches/safari-536.28-branch/Tools/ChangeLog
r135007 r135751 1 2012-11-26 Lucas Forschler <lforschler@apple.com> 2 3 Merge r132713 4 5 2012-10-26 Anders Carlsson <andersca@apple.com> 6 7 Crash when making NPRuntime calls with a null NPP pointer 8 https://bugs.webkit.org/show_bug.cgi?id=100569 9 10 Reviewed by Darin Adler. 11 12 Add new NPRuntimeCallsWithNullNPP plug-in test. 13 14 * DumpRenderTree/DumpRenderTree.gypi: 15 * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: 16 * DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp: 17 (PluginTest::NPN_ReleaseVariantValue): 18 (PluginTest::netscapeFuncs): 19 * DumpRenderTree/TestNetscapePlugIn/PluginTest.h: 20 (PluginTest): 21 * DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeCallsWithNullNPP.cpp: Added. 22 (NPRuntimeCallsWithNullNPP): 23 (NPRuntimeCallsWithNullNPP::NPRuntimeCallsWithNullNPP): 24 (NPRuntimeCallsWithNullNPP::NPP_New): 25 * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj: 26 * DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro: 27 * GNUmakefile.am: 28 1 29 2012-11-16 Lucas Forschler <lforschler@apple.com> 2 30 -
branches/safari-536.28-branch/Tools/DumpRenderTree/DumpRenderTree.gypi
r134834 r135751 68 68 'TestNetscapePlugIn/Tests/GetUserAgentWithNullNPPFromNPPNew.cpp', 69 69 'TestNetscapePlugIn/Tests/NPPNewFails.cpp', 70 'TestNetscapePlugIn/Tests/NPRuntimeCallsWithNullNPP.cpp', 70 71 'TestNetscapePlugIn/Tests/NPRuntimeObjectFromDestroyedPlugin.cpp', 71 72 'TestNetscapePlugIn/Tests/NPRuntimeRemoveProperty.cpp', -
branches/safari-536.28-branch/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj
r134834 r135751 51 51 1ACF898D132EF41C00E915D4 /* NPDeallocateCalledBeforeNPShutdown.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACF898B132EF41C00E915D4 /* NPDeallocateCalledBeforeNPShutdown.cpp */; }; 52 52 1AD4CB2212A6D1350027A7AF /* GetUserAgentWithNullNPPFromNPPNew.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD4CB2012A6D1350027A7AF /* GetUserAgentWithNullNPPFromNPPNew.cpp */; }; 53 1AD8683F163B2FD000A28583 /* NPRuntimeCallsWithNullNPP.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD8683D163B2FD000A28583 /* NPRuntimeCallsWithNullNPP.cpp */; }; 53 54 1AD9D2FE12028409001A70D1 /* PluginScriptableNPObjectInvokeDefault.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD9D2FD12028409001A70D1 /* PluginScriptableNPObjectInvokeDefault.cpp */; }; 54 55 1AFF66BC137DEFD200791696 /* GetURLNotifyWithURLThatFailsToLoad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AFF66BB137DEA8300791696 /* GetURLNotifyWithURLThatFailsToLoad.cpp */; }; … … 250 251 1ACF898B132EF41C00E915D4 /* NPDeallocateCalledBeforeNPShutdown.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NPDeallocateCalledBeforeNPShutdown.cpp; sourceTree = "<group>"; }; 251 252 1AD4CB2012A6D1350027A7AF /* GetUserAgentWithNullNPPFromNPPNew.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GetUserAgentWithNullNPPFromNPPNew.cpp; sourceTree = "<group>"; }; 253 1AD8683D163B2FD000A28583 /* NPRuntimeCallsWithNullNPP.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NPRuntimeCallsWithNullNPP.cpp; sourceTree = "<group>"; }; 252 254 1AD9D2FD12028409001A70D1 /* PluginScriptableNPObjectInvokeDefault.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PluginScriptableNPObjectInvokeDefault.cpp; sourceTree = "<group>"; }; 253 255 1AFF66BB137DEA8300791696 /* GetURLNotifyWithURLThatFailsToLoad.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GetURLNotifyWithURLThatFailsToLoad.cpp; sourceTree = "<group>"; }; … … 488 490 BC0E24DE0E2D9451001B6BC2 /* AccessibilityUIElement.h */, 489 491 BC0E26140E2DA4C6001B6BC2 /* AccessibilityUIElementMac.mm */, 492 BC0E26140E2DA4C6001B6BC3 /* AccessibilityCommonMac.mm */, 490 493 BCA18B360C9B021900114369 /* AppleScriptController.h */, 491 494 BCA18B370C9B021900114369 /* AppleScriptController.m */, … … 548 551 5113DE6615F6CBE5005EC8B3 /* NPPNewFails.cpp */, 549 552 C031182A134E4A2B00919757 /* NPPSetWindowCalledDuringDestruction.cpp */, 553 1AD8683D163B2FD000A28583 /* NPRuntimeCallsWithNullNPP.cpp */, 550 554 1A24BAA8120734EE00FBB059 /* NPRuntimeObjectFromDestroyedPlugin.cpp */, 551 555 1AC77DCE120605B6005C19EF /* NPRuntimeRemoveProperty.cpp */, … … 908 912 5113DE6715F6CBE5005EC8B3 /* NPPNewFails.cpp in Sources */, 909 913 1C5C9B2E15F103AA0035558E /* LogNPPSetWindow.cpp in Sources */, 914 1AD8683F163B2FD000A28583 /* NPRuntimeCallsWithNullNPP.cpp in Sources */, 910 915 ); 911 916 runOnlyForDeploymentPostprocessing = 0; -
branches/safari-536.28-branch/Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp
r125127 r135751 219 219 } 220 220 221 void PluginTest::NPN_ReleaseVariantValue(NPVariant* variant) 222 { 223 browser->releasevariantvalue(variant); 224 } 225 221 226 #ifdef XP_MACOSX 222 227 bool PluginTest::NPN_ConvertPoint(double sourceX, double sourceY, NPCoordinateSpace sourceSpace, double *destX, double *destY, NPCoordinateSpace destSpace) … … 253 258 } 254 259 260 NPNetscapeFuncs* PluginTest::netscapeFuncs() 261 { 262 return browser; 263 } 264 255 265 void PluginTest::waitUntilDone() 256 266 { -
branches/safari-536.28-branch/Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.h
r125127 r135751 90 90 void NPN_ReleaseObject(NPObject*); 91 91 bool NPN_RemoveProperty(NPObject*, NPIdentifier propertyName); 92 void NPN_ReleaseVariantValue(NPVariant*); 92 93 93 94 #ifdef XP_MACOSX … … 124 125 125 126 const std::string& identifier() const { return m_identifier; } 127 128 static NPNetscapeFuncs* netscapeFuncs(); 126 129 127 130 void waitUntilDone(); -
branches/safari-536.28-branch/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj
r134834 r135751 435 435 </File> 436 436 <File 437 RelativePath="..\Tests\NPRuntimeCallsWithNullNPP.cpp" 438 > 439 </File> 440 <File 437 441 RelativePath="..\Tests\NPRuntimeObjectFromDestroyedPlugin.cpp" 438 442 > -
branches/safari-536.28-branch/Tools/DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro
r134834 r135751 25 25 Tests/NPPNewFails.cpp \ 26 26 Tests/NPPSetWindowCalledDuringDestruction.cpp \ 27 Tests/NPRuntimeCallsWithNullNPP.cpp \ 27 28 Tests/NPRuntimeObjectFromDestroyedPlugin.cpp \ 28 29 Tests/NPRuntimeRemoveProperty.cpp \ -
branches/safari-536.28-branch/Tools/GNUmakefile.am
r116205 r135751 216 216 Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPDeallocateCalledBeforeNPShutdown.cpp \ 217 217 Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPPSetWindowCalledDuringDestruction.cpp \ 218 Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeCallsWithNullNPP.cpp \ 218 219 Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeObjectFromDestroyedPlugin.cpp \ 219 220 Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeRemoveProperty.cpp \
Note:
See TracChangeset
for help on using the changeset viewer.