Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r228100 - Disallow evaluating JavaScript from NPP_Destroy() in …
…WebKit https://bugs.webkit.org/show_bug.cgi?id=181889 <rdar://problem/36674701> Reviewed by Brent Fulgham. Source/WebKit: Make the behavior of WebKit match the behavior of WebKitLegacy on Mac. * Shared/Plugins/NPObjectMessageReceiver.cpp: (WebKit::NPObjectMessageReceiver::hasMethod): (WebKit::NPObjectMessageReceiver::invoke): (WebKit::NPObjectMessageReceiver::invokeDefault): (WebKit::NPObjectMessageReceiver::hasProperty): (WebKit::NPObjectMessageReceiver::getProperty): (WebKit::NPObjectMessageReceiver::setProperty): (WebKit::NPObjectMessageReceiver::removeProperty): (WebKit::NPObjectMessageReceiver::enumerate): (WebKit::NPObjectMessageReceiver::construct): Bail out if the plugin is executing NPP_Destroy(). * WebProcess/Plugins/Plugin.cpp: (WebKit::Plugin::destroyPlugin): * WebProcess/Plugins/Plugin.h: (WebKit::Plugin::isBeingDestroyed const): Move bookkeeping of whether the plugin is being destroyed from PluginView to here. This makes it straightforward for NPObjectMessageReceiver to query this information. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::~PluginView): (WebKit::PluginView::destroyPluginAndReset): (WebKit::PluginView::recreateAndInitialize): (WebKit::PluginView::protectPluginFromDestruction): (WebKit::PluginView::unprotectPluginFromDestruction): Move bookkeeping of whether the plugin is being destroyed from here to Plugin. * WebProcess/Plugins/PluginView.h: (WebKit::PluginView::isBeingDestroyed const): Turn around and ask the plugin if it is being destroyed, if we have one. LayoutTests: Consolidate all the plugin tests that evaluate JavaScript from NPP_Destroy() and mark them as Wont Fix. In a subsequent change we will look to replace these tests with tests that ensure that we do not evaluate JavaScript from NPP_Destroy(). * platform/mac/TestExpectations: * platform/wk2/TestExpectations:
- Loading branch information
1 parent
b3e0236
commit 844f72c
Showing
9 changed files
with
102 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters