RESOLVED FIXED 41431
REGRESSION (r49411): Various crashes due to JavaScript execution during plug-in destruction
https://bugs.webkit.org/show_bug.cgi?id=41431
Summary REGRESSION (r49411): Various crashes due to JavaScript execution during plug-...
Alexey Proskuryakov
Reported 2010-06-30 15:12:41 PDT
We didn't use to support executing arbitrary JavaScript code during plug-in destruction in out of process case. This got accidentally enabled in r49411. Long term, we should do the same thing in in process and out of process cases, and the same as other browsers - which likely means allowing JS execution from NPP_Destroy (although there are lots of bugs and limitations there). But there is an unfortunate twist for out of process plug-ins, which makes WebKit take this code path even if plug-in didn't intend that: 1) Plug-in executes NPN_Evaluate, a sync message is sent to the browser. 2) At the same time, the browser stops the plug-in, and sends synchronous NPP_Destroy to plug-in. 3) The browser enters a loop, handling messages that come from plug-in, and waiting for a response to NPP_Destroy. 4) So, it executes the script from step 1 that could have been dropped.
Attachments
proposed fix (14.50 KB, patch)
2010-06-30 16:14 PDT, Alexey Proskuryakov
darin: review+
an alternative WebKit part of the fix (4.14 KB, patch)
2010-07-01 10:29 PDT, Alexey Proskuryakov
andersca: review+
Alexey Proskuryakov
Comment 1 2010-06-30 15:13:01 PDT
Alexey Proskuryakov
Comment 2 2010-06-30 16:14:01 PDT
Created attachment 60164 [details] proposed fix
Alexey Proskuryakov
Comment 3 2010-06-30 16:43:27 PDT
- waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID); + waitForReplyDroppingOtherMessages<NetscapePluginInstanceProxy::BooleanReply>(requestID); Oops, this doesn't belong here.
Alexey Proskuryakov
Comment 4 2010-07-01 10:29:26 PDT
Created attachment 60261 [details] an alternative WebKit part of the fix WebCore and LayoutTests parts are unchanged, not putting them up for review again.
Anders Carlsson
Comment 5 2010-07-01 10:43:49 PDT
Comment on attachment 60261 [details] an alternative WebKit part of the fix r=me
Alexey Proskuryakov
Comment 6 2010-07-01 11:48:57 PDT
Committed with alternative WebKit fix in <http://trac.webkit.org/changeset/62279>.
Note You need to log in before you can comment on or make changes to this bug.