Don't require the plugin to always use the same NPP struct we gave it in NPP_New
Neither WebCore, nor WebKit/mac, nor Firefox requires this, and
Shockwave (at least) seems to use a different NPP struct that contains
the same ndata member. So we shouldn't enforce it, either.
Fixes <http://webkit.org/b/47690> <rdar://problem/8553020> Assertion
failure in NetscapePlugin::fromNPP when using Shockwave in WebKit2
Reviewed by John Sullivan.
WebKit2:
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::fromNPP): Removed the bogus assertion.
WebKitTools:
Test that passing a different NPP struct back to the browser doesn't
cause an assertion failure
* DumpRenderTree/TestNetscapePlugIn/Tests/PassDifferentNPPStruct.cpp: Copied from WebKitTools/DumpRenderTree/TestNetscapePlugIn/Tests/win/GetValueNetscapeWindow.cpp.
(PassDifferentNPPStruct::PassDifferentNPPStruct): Initialize our
members.
(PassDifferentNPPStruct::NPP_SetWindow): Pass a different NPP to the
browser than the one it gave us in NPP_New and see if it works.
* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
* DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj:
Added PassDifferentNPPStruct.
LayoutTests:
Test that passing a different NPP struct back to the browser doesn't
cause an assertion failure
* plugins/pass-different-npp-struct-expected.txt: Added.
* plugins/pass-different-npp-struct.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70190 268f45cc-cd09-0410-ab3c-d52691b4dbfc
9 files changed