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

Issue 9817023: Make sure the plugin scriptable object is released before NPP_Destroy. (Closed)

Created:
8 years, 9 months ago by Wez
Modified:
8 years, 9 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

Make sure the plugin scriptable object is released before NPP_Destroy. When the we tear down a plugin instance the plugin process first invokes NPP_Destroy, and then tears down the IPC channel to the renderer, to give NPP_Destroy a chance to do last-minute scripting. When the IPC channel for the last instance is torn down we also clean up the IPC channels and stubs for any plugin-side NPObjects that remain. We suspect that some plugins implement the scriptable object as part of the plugin instance, rather than independently ref-counted, so that our releasing the object after NPP_Destroy actually triggers the plugin process to crash. This CL tears down the stub for the plugin's scriptable object before we call NPP_Destroy. As per crbug.com/119414, we will remove this code if it doesn't significantly impact crashes. BUG=101968 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=128179

Patch Set 1 #

Total comments: 2

Patch Set 2 : Update comment. #

Patch Set 3 : Restore parameter missed during rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -8 lines) Patch
M content/common/npobject_stub.h View 1 chunk +2 lines, -1 line 0 comments Download
M content/plugin/webplugin_delegate_stub.h View 2 chunks +2 lines, -0 lines 0 comments Download
M content/plugin/webplugin_delegate_stub.cc View 1 2 4 chunks +16 lines, -7 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
Wez
PTAL If this proves to address the crashes we're seeing then I'll follow-up with the ...
8 years, 9 months ago (2012-03-21 23:31:32 UTC) #1
cpu_(ooo_6.6-7.5)
lgtm adding john. If you get his lgtm you don't need to wait for Darin's. ...
8 years, 9 months ago (2012-03-22 00:09:28 UTC) #2
Wez
http://codereview.chromium.org/9817023/diff/1/content/plugin/webplugin_delegate_stub.cc File content/plugin/webplugin_delegate_stub.cc (right): http://codereview.chromium.org/9817023/diff/1/content/plugin/webplugin_delegate_stub.cc#newcode291 content/plugin/webplugin_delegate_stub.cc:291: // The stub will delete itself when the proxy ...
8 years, 9 months ago (2012-03-22 00:42:20 UTC) #3
jam
how do we know that it's the plugin scriptable object, and not any other objects ...
8 years, 9 months ago (2012-03-22 00:55:07 UTC) #4
Wez
On 2012/03/22 00:55:07, John Abd-El-Malek wrote: > how do we know that it's the plugin ...
8 years, 9 months ago (2012-03-22 01:03:03 UTC) #5
jam
talked to wez, lgtm but please file a bug to track removing this code by ...
8 years, 9 months ago (2012-03-22 01:21:00 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wez@chromium.org/9817023/4001
8 years, 9 months ago (2012-03-22 01:41:39 UTC) #7
commit-bot: I haz the power
Try job failure for 9817023-4001 (retry) on android for steps "Compile, build". It's a second ...
8 years, 9 months ago (2012-03-22 02:08:58 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wez@chromium.org/9817023/18001
8 years, 9 months ago (2012-03-22 04:44:36 UTC) #9
commit-bot: I haz the power
8 years, 9 months ago (2012-03-22 06:39:48 UTC) #10
Change committed as 128179

Powered by Google App Engine
This is Rietveld 408576698