2011-03-15 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Make sure that NP_Shutdown is always the last NPP function called
https://bugs.webkit.org/show_bug.cgi?id=56391
<rdar://problem/8989902>
Make sure to always increment the load count whenever a web process connection
is opened to a plug-in process, and decrement it when the last web process connection
goes away.
* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::createWebProcessConnection):
(WebKit::PluginProcess::startShutdownTimerIfNecessary):
* Shared/Plugins/Netscape/NetscapePluginModule.cpp:
* Shared/Plugins/Netscape/NetscapePluginModule.h:
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::NetscapePlugin):
(WebKit::NetscapePlugin::~NetscapePlugin):
2011-03-15 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Make sure that NP_Shutdown is always the last NPP function called
https://bugs.webkit.org/show_bug.cgi?id=56391
<rdar://problem/8989902>
Add test.
* plugins/npruntime/np-deallocate-called-before-np-shutdown-expected.txt: Added.
* plugins/npruntime/np-deallocate-called-before-np-shutdown.html: Added.
2011-03-15 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Make sure that NP_Shutdown is always the last NPP function called
https://bugs.webkit.org/show_bug.cgi?id=56391
Add a test that times out if an NP_Deallocate object is called after NP_Shutdown.
* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
* DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp:
(PluginTest::PluginTest):
(PluginTest::NP_Shutdown):
(PluginTest::registerNPShutdownFunction):
* DumpRenderTree/TestNetscapePlugIn/PluginTest.h:
* DumpRenderTree/TestNetscapePlugIn/Tests/NPDeallocateCalledBeforeNPShutdown.cpp: Added.
(NPDeallocateCalledBeforeNPShutdown::NPDeallocateCalledBeforeNPShutdown):
(NPDeallocateCalledBeforeNPShutdown::TestObject::~TestObject):
(NPDeallocateCalledBeforeNPShutdown::ScriptableObject::hasProperty):
(NPDeallocateCalledBeforeNPShutdown::ScriptableObject::getProperty):
(NPDeallocateCalledBeforeNPShutdown::NPP_New):
(NPDeallocateCalledBeforeNPShutdown::NPP_GetValue):
(NPDeallocateCalledBeforeNPShutdown::shutdown):
* DumpRenderTree/TestNetscapePlugIn/main.cpp:
(NP_Shutdown):
* DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj:
* DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro:
* GNUmakefile.am:
git-svn-id: svn://svn.chromium.org/blink/trunk@81157 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Showing
Please register or sign in to comment