Changeset 83300 in webkit
- Timestamp:
- Apr 8, 2011 9:00:38 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r83295 r83300 1 2011-04-07 Adam Roben <aroben@apple.com> 2 3 Test that NPP_SetWindow is passed a null window handle during plugin destruction on non-Mac platforms 4 5 Test for <http://webkit.org/b/47009> WebKit2 needs to call NPP_SetWindow when destroying a 6 plugin 7 8 Reviewed by Anders Carlsson. 9 10 * platform/win-wk2/Skipped: Removed a test that no longer crashes thanks to this fix. 11 12 * plugins/npp-set-window-called-during-destruction-expected.txt: Added. 13 * plugins/npp-set-window-called-during-destruction.html: Added. 14 15 * platform/mac/plugins/npp-set-window-called-during-destruction-expected.txt: Added. This is 16 different from the cross-platform results because we don't expect NPP_SetWindow to be called 17 during destruction. 18 19 * platform/win/plugins/npp-set-window-called-during-destruction-expected.txt: Added. This is 20 a copy of the cross-platform results, needed to override the Mac-specific results. 21 1 22 2011-04-08 Yi Shen <yi.4.shen@nokia.com> 2 23 -
trunk/LayoutTests/platform/win-wk2/Skipped
r83233 r83300 196 196 fast/frames/iframe-plugin-load-remove-document-crash.html 197 197 198 # Causes next test to crash? http://webkit.org/b/55780199 platform/win/plugins/draws-gradient.html200 201 198 # No keygen support 202 199 fast/html/keygen.html -
trunk/Source/WebKit2/ChangeLog
r83297 r83300 1 2011-04-07 Adam Roben <aroben@apple.com> 2 3 Pass NPP_SetWindow a null window handle during plugin destruction on non-Mac platforms 4 5 This matches WebKit1. 6 7 Fixes <http://webkit.org/b/47009> WebKit2 needs to call NPP_SetWindow when destroying a 8 plugin 9 10 Reviewed by Anders Carlsson. 11 12 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: 13 (WebKit::NetscapePlugin::destroy): Null out our NPWindow's window handle and pass it to 14 NPP_SetWindow (unless we're on Mac). 15 1 16 2011-04-08 Jamie Cooley <james.cooley@nokia.com> 2 17 -
trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp
r82442 r83300 492 492 stopAllStreams(); 493 493 494 #if !PLUGIN_ARCHITECTURE(MAC) 495 m_npWindow.window = 0; 496 callSetWindow(); 497 #endif 498 494 499 NPP_Destroy(0); 495 500 -
trunk/Tools/ChangeLog
r83271 r83300 1 2011-04-07 Adam Roben <aroben@apple.com> 2 3 Test that NPP_SetWindow is passed a null window handle during plugin destruction on non-Mac platforms 4 5 Test for <http://webkit.org/b/47009> WebKit2 needs to call NPP_SetWindow when destroying a 6 plugin 7 8 Reviewed by Anders Carlsson. 9 10 * DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp: 11 (pluginLogWithArguments): Moved code to format and log the message here... 12 (pluginLog): ...from here. 13 14 * DumpRenderTree/TestNetscapePlugIn/PluginObject.h: Added pluginLogWithArguments. 15 16 * DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp: 17 (PluginTest::log): Added. Calls through to pluginLogWithArguments. 18 19 * DumpRenderTree/TestNetscapePlugIn/PluginTest.h: Added log. 20 21 * DumpRenderTree/TestNetscapePlugIn/Tests/NPPSetWindowCalledDuringDestruction.cpp: Added. 22 (NPPSetWindowCalledDuringDestruction::setWillBeDestroyed): Records that destruction is about 23 to begin. 24 (NPPSetWindowCalledDuringDestruction::NPPSetWindowCalledDuringDestruction): Simple 25 constructor. 26 (NPPSetWindowCalledDuringDestruction::NPP_GetValue): Creates and returns a ScriptObject that 27 can be used to invoke our setWillBeDestroyed function. 28 (NPPSetWindowCalledDuringDestruction::NPP_SetWindow): Records what has happened (and logs if 29 anything unexpected happens). 30 (NPPSetWindowCalledDuringDestruction::NPP_Destroy): On Mac, logs a failure message if 31 NPP_SetWindow was called during destruction. On other platforms, logs a failure message if 32 NPP_SetWindow was *not* called during destruction. 33 (NPPSetWindowCalledDuringDestruction::ScriptObject::hasMethod): Return true for our only 34 method, setWillBeDestroyed. 35 (NPPSetWindowCalledDuringDestruction::ScriptObject::invoke): Call through to the PluginTest 36 object. 37 38 * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: 39 * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj: 40 * DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro: 41 * GNUmakefile.am: 42 Added new test. 43 44 * Scripts/old-run-webkit-tests: Skip the new test when using out-of-process plugins with 45 WebKit1 on Mac, since it can't work properly due to <http://webkit.org/b/58077>. 46 1 47 2011-04-08 Mario Sanchez Prada <msanchez@igalia.com> 2 48 -
trunk/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj
r83219 r83300 140 140 BCD08B710E1059D200A7D0C1 /* AccessibilityControllerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BCD08B700E1059D200A7D0C1 /* AccessibilityControllerMac.mm */; }; 141 141 BCF6C6500C98E9C000AC063E /* GCController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCF6C64F0C98E9C000AC063E /* GCController.cpp */; }; 142 C031182B134E4A2B00919757 /* NPPSetWindowCalledDuringDestruction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C031182A134E4A2B00919757 /* NPPSetWindowCalledDuringDestruction.cpp */; }; 142 143 C06F9ABC1267A7060058E1F6 /* PassDifferentNPPStruct.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C06F9ABB1267A7060058E1F6 /* PassDifferentNPPStruct.cpp */; }; 143 144 C0E720751281C828004EF533 /* EvaluateJSAfterRemovingPluginElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C0E720741281C828004EF533 /* EvaluateJSAfterRemovingPluginElement.cpp */; }; … … 324 325 BCD08B700E1059D200A7D0C1 /* AccessibilityControllerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AccessibilityControllerMac.mm; path = mac/AccessibilityControllerMac.mm; sourceTree = "<group>"; }; 325 326 BCF6C64F0C98E9C000AC063E /* GCController.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GCController.cpp; sourceTree = "<group>"; }; 327 C031182A134E4A2B00919757 /* NPPSetWindowCalledDuringDestruction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NPPSetWindowCalledDuringDestruction.cpp; sourceTree = "<group>"; }; 326 328 C06F9ABB1267A7060058E1F6 /* PassDifferentNPPStruct.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PassDifferentNPPStruct.cpp; sourceTree = "<group>"; }; 327 329 C0E720741281C828004EF533 /* EvaluateJSAfterRemovingPluginElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EvaluateJSAfterRemovingPluginElement.cpp; sourceTree = "<group>"; }; … … 488 490 1AD4CB2012A6D1350027A7AF /* GetUserAgentWithNullNPPFromNPPNew.cpp */, 489 491 1ACF898B132EF41C00E915D4 /* NPDeallocateCalledBeforeNPShutdown.cpp */, 492 C031182A134E4A2B00919757 /* NPPSetWindowCalledDuringDestruction.cpp */, 490 493 1A24BAA8120734EE00FBB059 /* NPRuntimeObjectFromDestroyedPlugin.cpp */, 491 494 1AC77DCE120605B6005C19EF /* NPRuntimeRemoveProperty.cpp */, … … 794 797 1ACF898D132EF41C00E915D4 /* NPDeallocateCalledBeforeNPShutdown.cpp in Sources */, 795 798 1A31EB3813466AC100017372 /* ConvertPoint.cpp in Sources */, 799 C031182B134E4A2B00919757 /* NPPSetWindowCalledDuringDestruction.cpp in Sources */, 796 800 ); 797 801 runOnlyForDeploymentPostprocessing = 0; -
trunk/Tools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp
r78359 r83300 74 74 } 75 75 76 // Helper function to log to the console object. 77 void pluginLog(NPP instance, const char* format, ...) 78 { 79 va_list args; 80 va_start(args, format); 76 void pluginLogWithArguments(NPP instance, const char* format, va_list args) 77 { 81 78 char message[2048] = "PLUGIN: "; 82 79 vsprintf(message + strlen(message), format, args); 83 va_end(args);84 80 85 81 NPObject* windowObject = 0; … … 92 88 pluginLogWithWindowObject(windowObject, instance, message); 93 89 browser->releaseobject(windowObject); 90 } 91 92 // Helper function to log to the console object. 93 void pluginLog(NPP instance, const char* format, ...) 94 { 95 va_list args; 96 va_start(args, format); 97 pluginLogWithArguments(instance, format, args); 98 va_end(args); 94 99 } 95 100 -
trunk/Tools/DumpRenderTree/TestNetscapePlugIn/PluginObject.h
r73226 r83300 88 88 extern void testNPRuntime(NPP npp); 89 89 extern void pluginLog(NPP instance, const char* format, ...); 90 extern void pluginLogWithArguments(NPP instance, const char* format, va_list args); 90 91 extern bool testDocumentOpen(NPP npp); 91 92 extern bool testWindowOpen(NPP npp); -
trunk/Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp
r82723 r83300 26 26 #include "PluginTest.h" 27 27 28 #include "PluginObject.h" 28 29 #include <assert.h> 29 30 #include <string.h> … … 169 170 } 170 171 172 void PluginTest::log(const char* format, ...) 173 { 174 va_list args; 175 va_start(args, format); 176 pluginLogWithArguments(m_npp, format, args); 177 va_end(args); 178 } 179 171 180 void PluginTest::waitUntilDone() 172 181 { -
trunk/Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.h
r82723 r83300 79 79 80 80 void executeScript(const char*); 81 void log(const char* format, ...); 81 82 82 83 void registerNPShutdownFunction(void (*)()); -
trunk/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj
r82477 r83300 408 408 <File 409 409 RelativePath="..\Tests\NPDeallocateCalledBeforeNPShutdown.cpp" 410 > 411 </File> 412 <File 413 RelativePath="..\Tests\NPPSetWindowCalledDuringDestruction.cpp" 410 414 > 411 415 </File> -
trunk/Tools/DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro
r82125 r83300 34 34 Tests/GetUserAgentWithNullNPPFromNPPNew.cpp \ 35 35 Tests/NPDeallocateCalledBeforeNPShutdown.cpp \ 36 Tests/NPPSetWindowCalledDuringDestruction.cpp \ 36 37 Tests/NPRuntimeObjectFromDestroyedPlugin.cpp \ 37 38 Tests/NPRuntimeRemoveProperty.cpp \ -
trunk/Tools/GNUmakefile.am
r83219 r83300 184 184 Tools/DumpRenderTree/TestNetscapePlugIn/Tests/GetUserAgentWithNullNPPFromNPPNew.cpp \ 185 185 Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPDeallocateCalledBeforeNPShutdown.cpp \ 186 Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPPSetWindowCalledDuringDestruction.cpp \ 186 187 Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeObjectFromDestroyedPlugin.cpp \ 187 188 Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeRemoveProperty.cpp \ -
trunk/Tools/Scripts/old-run-webkit-tests
r83120 r83300 601 601 } 602 602 603 if (isAppleMacWebKit() && $platform ne "mac-wk2" && osXVersion()->{minor} >= 6 && architecture() =~ /x86_64/) { 604 # This test relies on executing JavaScript during NPP_Destroy, which isn't supported with 605 # out-of-process plugins in WebKit1. See <http://webkit.org/b/58077>. 606 $ignoredFiles{'plugins/npp-set-window-called-during-destruction.html'} = 1; 607 } 608 603 609 processIgnoreTests(join(',', @ignoreTests), "ignore-tests") if @ignoreTests; 604 610 if (!$ignoreSkipped) {
Note: See TracChangeset
for help on using the changeset viewer.