Changeset 70662 in webkit
- Timestamp:
- Oct 27, 2010 10:13:35 AM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r70658 r70662 1 2010-10-27 Adam Roben <aroben@apple.com> 2 3 Reset TestNetscapePlugIn's NPP_GetValue pointer when 4 NullNPPGetValuePointer finishes running 5 6 Fixes <http://webkit.org/b/48435> REGRESSION (r70655): Many plugins 7 tests are failing on Qt 8 9 Reviewed by Anders Carlsson. 10 11 * DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp: 12 (PluginTest::NPP_Destroy): 13 * DumpRenderTree/TestNetscapePlugIn/PluginTest.h: 14 Added a do-nothing NPP_Destroy implementation. 15 16 * DumpRenderTree/TestNetscapePlugIn/Tests/NullNPPGetValuePointer.cpp: 17 (NullNPPGetValuePointer::NullNPPGetValuePointer): Save the original 18 NPP_GetValue pointer in m_originalNPPGetValuePointer so we can restore 19 it later. 20 (NullNPPGetValuePointer::NPP_Destroy): Added. Restores the original 21 NPP_GetValue pointer so it can be used in other tests. 22 23 * DumpRenderTree/TestNetscapePlugIn/main.cpp: 24 (NPP_Destroy): 25 * DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp: 26 (webkit_test_plugin_destroy_instance): 27 Call through to the PluginTest when NPP_Destroy is called. 28 1 29 2010-10-26 Brian Weinstein <bweinstein@apple.com> 2 30 -
trunk/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp
r70265 r70662 49 49 PluginTest::~PluginTest() 50 50 { 51 } 52 53 NPError PluginTest::NPP_Destroy(NPSavedData**) 54 { 55 return NPERR_NO_ERROR; 51 56 } 52 57 -
trunk/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginTest.h
r70265 r70662 56 56 57 57 // NPP functions. 58 virtual NPError NPP_Destroy(NPSavedData**); 58 59 virtual NPError NPP_DestroyStream(NPStream* stream, NPReason reason); 59 60 virtual NPError NPP_GetValue(NPPVariable, void* value); -
trunk/WebKitTools/DumpRenderTree/TestNetscapePlugIn/Tests/NullNPPGetValuePointer.cpp
r70653 r70662 37 37 38 38 private: 39 virtual NPError NPP_Destroy(NPSavedData**); 39 40 virtual NPError NPP_GetValue(NPPVariable, void* value); 41 42 NPP_GetValueProcPtr m_originalNPPGetValuePointer; 40 43 }; 41 44 … … 44 47 NullNPPGetValuePointer::NullNPPGetValuePointer(NPP npp, const string& identifier) 45 48 : PluginTest(npp, identifier) 49 , m_originalNPPGetValuePointer(pluginFunctions->getvalue) 46 50 { 47 51 // Be sneaky and null out the getvalue pointer the browser is holding. This simulates a plugin … … 52 56 } 53 57 58 NPError NullNPPGetValuePointer::NPP_Destroy(NPSavedData**) 59 { 60 // Set the NPP_GetValue pointer back the way it was before we mucked with it so we don't mess 61 // up future uses of the plugin module. 62 pluginFunctions->getvalue = m_originalNPPGetValuePointer; 63 return NPERR_NO_ERROR; 64 } 65 54 66 NPError NullNPPGetValuePointer::NPP_GetValue(NPPVariable, void*) 55 67 { -
trunk/WebKitTools/DumpRenderTree/TestNetscapePlugIn/main.cpp
r70653 r70662 284 284 #endif 285 285 286 obj->pluginTest->NPP_Destroy(save); 287 286 288 browser->releaseobject(&obj->header); 287 289 } -
trunk/WebKitTools/DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp
r70655 r70662 106 106 107 107 static NPError 108 webkit_test_plugin_destroy_instance(NPP instance, NPSavedData** /*save*/)108 webkit_test_plugin_destroy_instance(NPP instance, NPSavedData** save) 109 109 { 110 110 PluginObject* obj = static_cast<PluginObject*>(instance->pdata); … … 129 129 if (obj->onSetWindow) 130 130 free(obj->onSetWindow); 131 132 obj->pluginTest->NPP_Destroy(save); 131 133 132 134 browser->releaseobject(&obj->header);
Note: See TracChangeset
for help on using the changeset viewer.