Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(581)

Issue 174383: Fixes a crash caused due to a call to NPP_DestroyStream occuring in the conte... (Closed)

Created:
11 years, 4 months ago by ananta
Modified:
9 years, 6 months ago
Reviewers:
jam
CC:
chromium-reviews_googlegroups.com, darin (slow to review), jam
Visibility:
Public.

Description

Fixes a crash caused due to a call to NPP_DestroyStream occuring in the context of NPP_NewStream. The plugin would invoke NPN_Evaluate to display an alert in the context of NewStream. This would cause the didFail IPC to be dispatched which would cause the plugin to invoke another call to NPP_NewStream which would repeat these steps and crash. The didFail call from the renderer did not honor the deferred load flag which we set in WebPluginImpl prior to dispatching stream IPCs to the plugin. Fix is to dispatch the didFail call when we receive an ack from the plugin indicating that it is ready to accept stream data. This fixes bug http://code.google.com/p/chromium/issues/detail?id=20063 The other change is in WebPluginImpl::TearDownPluginInstance, where we run through the list of resource clients and cancel them. We call didFail on these clients here, which occurs anyway through the PluginDestroyed code path. Bug=20063 Test=Convered by interactive UI test. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=24593

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Total comments: 4

Patch Set 7 : '' #

Patch Set 8 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+145 lines, -13 lines) Patch
A chrome/test/data/npapi/plugin_url_request_404.html View 2 1 chunk +26 lines, -0 lines 0 comments Download
M chrome/test/interactive_ui/npapi_interactive_test.cc View 6 7 2 chunks +21 lines, -0 lines 0 comments Download
M webkit/glue/plugins/test/plugin_client.cc View 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M webkit/glue/plugins/test/plugin_geturl_test.h View 2 3 4 5 6 7 2 chunks +6 lines, -0 lines 0 comments Download
M webkit/glue/plugins/test/plugin_geturl_test.cc View 2 3 4 5 6 7 5 chunks +69 lines, -1 line 0 comments Download
M webkit/glue/plugins/test/plugin_test.h View 2 3 4 5 6 7 1 chunk +4 lines, -3 lines 0 comments Download
M webkit/glue/plugins/test/plugin_test.cc View 2 3 4 5 6 7 2 chunks +2 lines, -0 lines 0 comments Download
M webkit/glue/webplugin_impl.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M webkit/glue/webplugin_impl.cc View 1 2 3 4 5 6 7 4 chunks +15 lines, -8 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
ananta
11 years, 4 months ago (2009-08-25 01:50:01 UTC) #1
jam
On Mon, Aug 24, 2009 at 6:50 PM, <ananta@chromium.org> wrote: > Reviewers: John Abd-El-Malek, > ...
11 years, 4 months ago (2009-08-25 02:01:34 UTC) #2
ananta
Webkit's plugin implementation does not have this bug, i.e. it does not call didFail when ...
11 years, 4 months ago (2009-08-25 02:12:32 UTC) #3
iyengar
Just to clear things up, FF and Safari both exhibit this behavior. In Webkit thisis ...
11 years, 4 months ago (2009-08-25 03:28:13 UTC) #4
darin (slow to review)
On Mon, Aug 24, 2009 at 6:50 PM, <ananta@chromium.org> wrote: > Reviewers: John Abd-El-Malek, > ...
11 years, 4 months ago (2009-08-25 16:18:53 UTC) #5
ananta
The CL has been updated with a UI test which validates this case. -Ananta
11 years, 4 months ago (2009-08-26 18:27:25 UTC) #6
jam
lgtm http://codereview.chromium.org/174383/diff/1058/1067 File chrome/test/interactive_ui/npapi_interactive_test.cc (right): http://codereview.chromium.org/174383/diff/1058/1067#newcode92 Line 92: automation()->WaitForAppModalDialog(5000); perhaps use action_max_timeout_ms()? You need to ...
11 years, 4 months ago (2009-08-26 22:44:45 UTC) #7
ananta
11 years, 4 months ago (2009-08-26 22:58:45 UTC) #8
http://codereview.chromium.org/174383/diff/1058/1067
File chrome/test/interactive_ui/npapi_interactive_test.cc (right):

http://codereview.chromium.org/174383/diff/1058/1067#newcode92
Line 92: automation()->WaitForAppModalDialog(5000);
On 2009/08/26 22:44:46, John Abd-El-Malek wrote:
> perhaps use action_max_timeout_ms()?  You need to use timeouts that differ
when
> running on purify, since things are much slower there.

Done.

http://codereview.chromium.org/174383/diff/1058/1064
File webkit/glue/plugins/test/plugin_geturl_test.cc (right):

http://codereview.chromium.org/174383/diff/1058/1064#newcode40
Line 40: 
On 2009/08/26 22:44:46, John Abd-El-Malek wrote:
> nit: extra line
Removed

Powered by Google App Engine
This is Rietveld 408576698