[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
aroben at apple.com
aroben at apple.com
Wed Dec 22 15:02:14 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 3397710cc73f1ea1df3696e29773d9566f1a8a1d
Author: aroben at apple.com <aroben at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Oct 27 17:13:35 2010 +0000
Reset TestNetscapePlugIn's NPP_GetValue pointer when NullNPPGetValuePointer finishes running
Fixes <http://webkit.org/b/48435> REGRESSION (r70655): Many plugins
tests are failing on Qt
Reviewed by Anders Carlsson.
* DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp:
(PluginTest::NPP_Destroy):
* DumpRenderTree/TestNetscapePlugIn/PluginTest.h:
Added a do-nothing NPP_Destroy implementation.
* DumpRenderTree/TestNetscapePlugIn/Tests/NullNPPGetValuePointer.cpp:
(NullNPPGetValuePointer::NullNPPGetValuePointer): Save the original
NPP_GetValue pointer in m_originalNPPGetValuePointer so we can restore
it later.
(NullNPPGetValuePointer::NPP_Destroy): Added. Restores the original
NPP_GetValue pointer so it can be used in other tests.
* DumpRenderTree/TestNetscapePlugIn/main.cpp:
(NPP_Destroy):
* DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp:
(webkit_test_plugin_destroy_instance):
Call through to the PluginTest when NPP_Destroy is called.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70662 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 779f838..d8d636a 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,31 @@
+2010-10-27 Adam Roben <aroben at apple.com>
+
+ Reset TestNetscapePlugIn's NPP_GetValue pointer when
+ NullNPPGetValuePointer finishes running
+
+ Fixes <http://webkit.org/b/48435> REGRESSION (r70655): Many plugins
+ tests are failing on Qt
+
+ Reviewed by Anders Carlsson.
+
+ * DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp:
+ (PluginTest::NPP_Destroy):
+ * DumpRenderTree/TestNetscapePlugIn/PluginTest.h:
+ Added a do-nothing NPP_Destroy implementation.
+
+ * DumpRenderTree/TestNetscapePlugIn/Tests/NullNPPGetValuePointer.cpp:
+ (NullNPPGetValuePointer::NullNPPGetValuePointer): Save the original
+ NPP_GetValue pointer in m_originalNPPGetValuePointer so we can restore
+ it later.
+ (NullNPPGetValuePointer::NPP_Destroy): Added. Restores the original
+ NPP_GetValue pointer so it can be used in other tests.
+
+ * DumpRenderTree/TestNetscapePlugIn/main.cpp:
+ (NPP_Destroy):
+ * DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp:
+ (webkit_test_plugin_destroy_instance):
+ Call through to the PluginTest when NPP_Destroy is called.
+
2010-10-26 Brian Weinstein <bweinstein at apple.com>
Reviewed by Adam Roben.
diff --git a/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp b/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp
index 9eb421c..e41e6e5 100644
--- a/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp
+++ b/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp
@@ -50,6 +50,11 @@ PluginTest::~PluginTest()
{
}
+NPError PluginTest::NPP_Destroy(NPSavedData**)
+{
+ return NPERR_NO_ERROR;
+}
+
NPError PluginTest::NPP_DestroyStream(NPStream *stream, NPReason reason)
{
return NPERR_NO_ERROR;
diff --git a/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginTest.h b/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginTest.h
index 0100829..0497764 100644
--- a/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginTest.h
+++ b/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginTest.h
@@ -55,6 +55,7 @@ public:
virtual ~PluginTest();
// NPP functions.
+ virtual NPError NPP_Destroy(NPSavedData**);
virtual NPError NPP_DestroyStream(NPStream* stream, NPReason reason);
virtual NPError NPP_GetValue(NPPVariable, void* value);
virtual NPError NPP_SetWindow(NPP, NPWindow*);
diff --git a/WebKitTools/DumpRenderTree/TestNetscapePlugIn/Tests/NullNPPGetValuePointer.cpp b/WebKitTools/DumpRenderTree/TestNetscapePlugIn/Tests/NullNPPGetValuePointer.cpp
index 2c3aa30..9e4e976 100644
--- a/WebKitTools/DumpRenderTree/TestNetscapePlugIn/Tests/NullNPPGetValuePointer.cpp
+++ b/WebKitTools/DumpRenderTree/TestNetscapePlugIn/Tests/NullNPPGetValuePointer.cpp
@@ -36,13 +36,17 @@ public:
NullNPPGetValuePointer(NPP, const string& identifier);
private:
+ virtual NPError NPP_Destroy(NPSavedData**);
virtual NPError NPP_GetValue(NPPVariable, void* value);
+
+ NPP_GetValueProcPtr m_originalNPPGetValuePointer;
};
static PluginTest::Register<NullNPPGetValuePointer> registrar("null-npp-getvalue-pointer");
NullNPPGetValuePointer::NullNPPGetValuePointer(NPP npp, const string& identifier)
: PluginTest(npp, identifier)
+ , m_originalNPPGetValuePointer(pluginFunctions->getvalue)
{
// Be sneaky and null out the getvalue pointer the browser is holding. This simulates a plugin
// that doesn't implement NPP_GetValue (like Shockwave Director 10.3 on Windows). Note that if
@@ -51,6 +55,14 @@ NullNPPGetValuePointer::NullNPPGetValuePointer(NPP npp, const string& identifier
pluginFunctions->getvalue = 0;
}
+NPError NullNPPGetValuePointer::NPP_Destroy(NPSavedData**)
+{
+ // Set the NPP_GetValue pointer back the way it was before we mucked with it so we don't mess
+ // up future uses of the plugin module.
+ pluginFunctions->getvalue = m_originalNPPGetValuePointer;
+ return NPERR_NO_ERROR;
+}
+
NPError NullNPPGetValuePointer::NPP_GetValue(NPPVariable, void*)
{
pluginLog(m_npp, "NPP_GetValue was called but should not have been. Maybe WebKit copied the NPPluginFuncs struct, which would invalidate this test.");
diff --git a/WebKitTools/DumpRenderTree/TestNetscapePlugIn/main.cpp b/WebKitTools/DumpRenderTree/TestNetscapePlugIn/main.cpp
index 24ba3b8..6ae770d 100644
--- a/WebKitTools/DumpRenderTree/TestNetscapePlugIn/main.cpp
+++ b/WebKitTools/DumpRenderTree/TestNetscapePlugIn/main.cpp
@@ -283,6 +283,8 @@ NPError NPP_Destroy(NPP instance, NPSavedData **save)
CFRelease(obj->coreAnimationLayer);
#endif
+ obj->pluginTest->NPP_Destroy(save);
+
browser->releaseobject(&obj->header);
}
return NPERR_NO_ERROR;
diff --git a/WebKitTools/DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp b/WebKitTools/DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp
index 66f6831..14bb8ef 100644
--- a/WebKitTools/DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp
+++ b/WebKitTools/DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp
@@ -105,7 +105,7 @@ webkit_test_plugin_new_instance(NPMIMEType /*mimetype*/,
}
static NPError
-webkit_test_plugin_destroy_instance(NPP instance, NPSavedData** /*save*/)
+webkit_test_plugin_destroy_instance(NPP instance, NPSavedData** save)
{
PluginObject* obj = static_cast<PluginObject*>(instance->pdata);
if (obj) {
@@ -129,6 +129,8 @@ webkit_test_plugin_destroy_instance(NPP instance, NPSavedData** /*save*/)
if (obj->onSetWindow)
free(obj->onSetWindow);
+ obj->pluginTest->NPP_Destroy(save);
+
browser->releaseobject(&obj->header);
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list