Changeset 71249 in webkit
- Timestamp:
- Nov 3, 2010 10:32:56 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 2 deleted
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r71245 r71249 1 2010-11-03 Adam Roben <aroben@apple.com> 2 3 Add a plugin test that evaluates JS after removing the plugin element 4 from the document 5 6 This test replaces platform/win/plugins/plugin-delayed-destroy.html. 7 That test was made to prevent a crash very similar to this one, but 8 unfortunately tested only the mechanism that prevented the crash and 9 not whether the crash itself was prevented. Since WebKit2 uses a 10 different mechanism to prevent the crash, the test was failing even 11 though WebKit2 was not vulnerable to the crash. This new test crashes 12 if there is no mechanism in place to prevent it and passes in both 13 WebKit1 and WebKit2. 14 15 Fixes <http://webkit.org/b/46711> <rdar://problem/8485903> 16 platform/win/plugins/plugin-delayed-destroy.html fails in WebKit2 17 18 Reviewed by Anders Carlsson. 19 20 * platform/mac/Skipped: Added the new test, which fails in WebKit1 on SnowLeopard. 21 22 * platform/win-wk2/Skipped: Removed platform/win/plugins/plugin-delayed-destroy.html. 23 24 * platform/win/plugins/plugin-delayed-destroy-expected.txt: Removed. 25 * platform/win/plugins/plugin-delayed-destroy.html: Removed. 26 27 * plugins/evaluate-js-after-removing-plugin-element-expected.txt: Added. 28 * plugins/evaluate-js-after-removing-plugin-element.html: Added. 29 1 30 2010-11-03 Stephen White <senorblanco@chromium.org> 2 31 -
trunk/LayoutTests/platform/mac/Skipped
r70803 r71249 273 273 # https://bugs.webkit.org/show_bug.cgi?id=47901 274 274 fast/canvas/canvas-getImageData-negative-source.html 275 276 # Times out because plugins aren't allowed to execute JS after NPP_Destroy has been called in WebKit1's OOP plugins implementation http://webkit.org/b/48929 277 plugins/evaluate-js-after-removing-plugin-element.html -
trunk/LayoutTests/platform/win-wk2/Skipped
r70781 r71249 76 76 plugins/embed-attributes-style.html 77 77 78 # http://webkit.org/b/4671179 platform/win/plugins/plugin-delayed-destroy.html80 81 78 # http://webkit.org/b/46715 82 79 plugins/npruntime/invoke-failure.html -
trunk/WebKitTools/ChangeLog
r71238 r71249 1 2010-11-03 Adam Roben <aroben@apple.com> 2 3 Add a plugin test that evaluates JS after removing the plugin element 4 from the document 5 6 This test replaces platform/win/plugins/plugin-delayed-destroy.html. 7 That test was made to prevent a crash very similar to this one, but 8 unfortunately tested only the mechanism that prevented the crash and 9 not whether the crash itself was prevented. Since WebKit2 uses a 10 different mechanism to prevent the crash, the test was failing even 11 though WebKit2 was not vulnerable to the crash. This new test crashes 12 if there is no mechanism in place to prevent it and passes in both 13 WebKit1 and WebKit2. 14 15 Fixes <http://webkit.org/b/46711> <rdar://problem/8485903> 16 platform/win/plugins/plugin-delayed-destroy.html fails in WebKit2 17 18 Reviewed by Anders Carlsson. 19 20 * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: 21 * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj: 22 * DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro: 23 * GNUmakefile.am: 24 Added new file. 25 26 * DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp: 27 (pluginDeallocate): Make sure we delete the PluginTest object. This 28 prevents a leak and also allows us to test the crash. 29 30 * DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp: 31 (PluginTest::executeScript): Made this into a non-static member 32 function. 33 34 (PluginTest::waitUntilDone): 35 (PluginTest::notifyDone): 36 Updated for changes to executeScript. 37 38 * DumpRenderTree/TestNetscapePlugIn/PluginTest.h: Added executeScript. 39 40 * DumpRenderTree/TestNetscapePlugIn/Tests/EvaluateJSAfterRemovingPluginElement.cpp: Added. 41 (EvaluateJSAfterRemovingPluginElement::EvaluateJSAfterRemovingPluginElement): 42 Initialize ourselves and tell the test harness to wait. 43 (EvaluateJSAfterRemovingPluginElement::NPP_DestroyStream): Remove our 44 plugin element from the document, then execute some JavaScript. If 45 WebKit does not have appropriate mechanisms in place, we'll be 46 destroyed inside the first call to executeScript and crash on the 47 second call. 48 1 49 2010-11-02 Stephen White <senorblanco@chromium.org> 2 50 -
trunk/WebKitTools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj
r70653 r71249 133 133 BCF6C6500C98E9C000AC063E /* GCController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCF6C64F0C98E9C000AC063E /* GCController.cpp */; }; 134 134 C06F9ABC1267A7060058E1F6 /* PassDifferentNPPStruct.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C06F9ABB1267A7060058E1F6 /* PassDifferentNPPStruct.cpp */; }; 135 C0E720751281C828004EF533 /* EvaluateJSAfterRemovingPluginElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C0E720741281C828004EF533 /* EvaluateJSAfterRemovingPluginElement.cpp */; }; 135 136 C0EC3C9C12787F0500939164 /* NullNPPGetValuePointer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C0EC3C9B12787F0500939164 /* NullNPPGetValuePointer.cpp */; }; 136 137 E1B7816511AF31B7007E1BC2 /* MockGeolocationProvider.mm in Sources */ = {isa = PBXBuildFile; fileRef = E1B7808711AF1669007E1BC2 /* MockGeolocationProvider.mm */; }; … … 308 309 BCF6C64F0C98E9C000AC063E /* GCController.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GCController.cpp; sourceTree = "<group>"; }; 309 310 C06F9ABB1267A7060058E1F6 /* PassDifferentNPPStruct.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PassDifferentNPPStruct.cpp; sourceTree = "<group>"; }; 311 C0E720741281C828004EF533 /* EvaluateJSAfterRemovingPluginElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EvaluateJSAfterRemovingPluginElement.cpp; sourceTree = "<group>"; }; 310 312 C0EC3C9B12787F0500939164 /* NullNPPGetValuePointer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NullNPPGetValuePointer.cpp; sourceTree = "<group>"; }; 311 313 E1B7808511AF1643007E1BC2 /* MockGeolocationProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MockGeolocationProvider.h; path = mac/MockGeolocationProvider.h; sourceTree = "<group>"; }; … … 463 465 children = ( 464 466 1A215A7511F26072008AD0F5 /* DocumentOpenInDestroyStream.cpp */, 467 C0E720741281C828004EF533 /* EvaluateJSAfterRemovingPluginElement.cpp */, 465 468 1A24BAA8120734EE00FBB059 /* NPRuntimeObjectFromDestroyedPlugin.cpp */, 466 469 1AC77DCE120605B6005C19EF /* NPRuntimeRemoveProperty.cpp */, … … 752 755 C06F9ABC1267A7060058E1F6 /* PassDifferentNPPStruct.cpp in Sources */, 753 756 C0EC3C9C12787F0500939164 /* NullNPPGetValuePointer.cpp in Sources */, 757 C0E720751281C828004EF533 /* EvaluateJSAfterRemovingPluginElement.cpp in Sources */, 754 758 ); 755 759 runOnlyForDeploymentPostprocessing = 0; -
trunk/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp
r70653 r71249 28 28 #include "PluginObject.h" 29 29 30 #include "PluginTest.h" 30 31 #include "TestObject.h" 31 32 #include <assert.h> … … 991 992 { 992 993 PluginObject* plugin = reinterpret_cast<PluginObject*>(header); 994 delete plugin->pluginTest; 993 995 if (plugin->testObject) 994 996 browser->releaseobject(plugin->testObject); -
trunk/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp
r70662 r71249 102 102 } 103 103 104 static void executeScript(NPP npp,const char* script)104 void PluginTest::executeScript(const char* script) 105 105 { 106 106 NPObject* windowScriptObject; 107 browser->getvalue( npp, NPNVWindowNPObject, &windowScriptObject);107 browser->getvalue(m_npp, NPNVWindowNPObject, &windowScriptObject); 108 108 109 109 NPString npScript; … … 112 112 113 113 NPVariant browserResult; 114 browser->evaluate( npp, windowScriptObject, &npScript, &browserResult);114 browser->evaluate(m_npp, windowScriptObject, &npScript, &browserResult); 115 115 browser->releasevariantvalue(&browserResult); 116 116 } … … 118 118 void PluginTest::waitUntilDone() 119 119 { 120 executeScript( m_npp,"layoutTestController.waitUntilDone()");120 executeScript("layoutTestController.waitUntilDone()"); 121 121 } 122 122 123 123 void PluginTest::notifyDone() 124 124 { 125 executeScript( m_npp,"layoutTestController.notifyDone()");125 executeScript("layoutTestController.notifyDone()"); 126 126 } 127 127 -
trunk/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginTest.h
r70662 r71249 69 69 bool NPN_RemoveProperty(NPObject*, NPIdentifier propertyName); 70 70 71 void executeScript(const char*); 72 71 73 template<typename TestClassTy> class Register { 72 74 public: -
trunk/WebKitTools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj
r70653 r71249 376 376 </File> 377 377 <File 378 RelativePath="..\Tests\EvaluateJSAfterRemovingPluginElement.cpp" 379 > 380 </File> 381 <File 378 382 RelativePath="..\Tests\NPRuntimeObjectFromDestroyedPlugin.cpp" 379 383 > -
trunk/WebKitTools/DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro
r70653 r71249 30 30 TestObject.cpp \ 31 31 Tests/DocumentOpenInDestroyStream.cpp \ 32 Tests/EvaluateJSAfterRemovingPluginElement.cpp \ 32 33 Tests/NPRuntimeObjectFromDestroyedPlugin.cpp \ 33 34 Tests/NPRuntimeRemoveProperty.cpp \ -
trunk/WebKitTools/GNUmakefile.am
r70653 r71249 168 168 WebKitTools/DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp \ 169 169 WebKitTools/DumpRenderTree/TestNetscapePlugIn/Tests/DocumentOpenInDestroyStream.cpp \ 170 WebKitTools/DumpRenderTree/TestNetscapePlugIn/Tests/EvaluateJSAfterRemovingPluginElement.cpp \ 170 171 WebKitTools/DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeObjectFromDestroyedPlugin.cpp \ 171 172 WebKitTools/DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeRemoveProperty.cpp \
Note: See TracChangeset
for help on using the changeset viewer.