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

Issue 69363002: Pepper: Tighten GetLiveModule in PluginRegistry. (Closed)

Created:
7 years, 1 month ago by teravest
Modified:
7 years, 1 month ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam
Visibility:
Public.

Description

Pepper: Tighten GetLiveModule in PluginRegistry. On PepperPluginInstanceImpl::Delete(), we send a synchronous DidDestroy message to the plugin. The plugin can exit() in response to this message. While the renderer is waiting for a response (and holding a reference to PepperPluginInstanceImpl on the stack), another plugin for the page could create an instance of a plugin using the same path as the deleted instance. This can cause a PluginModule to be reused on the host for a plugin which is no longer live. In this case, sending DidCreate will fail. Alternatively, the lifetime of PluginModule could be cleaned up, but there are many uses of PepperPluginInstanceImpl::module() throughout the codebase. I'm happy to look at seeing if that can be cleaned up in another change. BUG= R=dmichael@chromium.org, teravest@google.com Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=234659

Patch Set 1 #

Patch Set 2 : Gross possible test fix #

Total comments: 1

Patch Set 3 : Variable renaming for dmichael #

Patch Set 4 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -3 lines) Patch
M content/renderer/pepper/pepper_plugin_instance_impl.h View 1 2 3 2 chunks +5 lines, -0 lines 0 comments Download
M content/renderer/pepper/pepper_plugin_instance_impl.cc View 1 2 3 3 chunks +7 lines, -0 lines 0 comments Download
M content/renderer/pepper/pepper_plugin_registry.cc View 1 2 2 chunks +23 lines, -3 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
teravest
7 years, 1 month ago (2013-11-11 23:10:38 UTC) #1
dmichael (off chromium)
I'm not excited about this strategy... especially if it has to special-case the empty set. ...
7 years, 1 month ago (2013-11-11 23:41:36 UTC) #2
teravest
On 2013/11/11 23:41:36, dmichael wrote: > I'm not excited about this strategy... especially if it ...
7 years, 1 month ago (2013-11-12 15:19:34 UTC) #3
teravest1
Sadly, that won't work. We can't call module_->InstanceDeleted(this); before sending DidDestory. This is because DidDestroy ...
7 years, 1 month ago (2013-11-12 16:21:35 UTC) #4
teravest
I've updated the change to rename "it" and "jt" as you suggested. Also I now ...
7 years, 1 month ago (2013-11-12 17:13:50 UTC) #5
dmichael (off chromium)
On 2013/11/12 17:13:50, teravest wrote: > I've updated the change to rename "it" and "jt" ...
7 years, 1 month ago (2013-11-12 17:28:48 UTC) #6
teravest
On Tue, Nov 12, 2013 at 10:28 AM, <dmichael@chromium.org> wrote: > On 2013/11/12 17:13:50, teravest ...
7 years, 1 month ago (2013-11-12 17:44:58 UTC) #7
dmichael (off chromium)
Okay, I give up. The patch you have is probably the best we can do. ...
7 years, 1 month ago (2013-11-12 17:53:58 UTC) #8
teravest1
Thanks for walking through this with me. Mind giving it an lgtm? On Tue, Nov ...
7 years, 1 month ago (2013-11-12 18:05:43 UTC) #9
dmichael (off chromium)
I thought I already did a couple comments ago? lgtm On Tue, Nov 12, 2013 ...
7 years, 1 month ago (2013-11-12 18:40:05 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/teravest@chromium.org/69363002/100002
7 years, 1 month ago (2013-11-12 19:53:05 UTC) #11
commit-bot: I haz the power
Failed to apply patch for content/renderer/pepper/pepper_plugin_instance_impl.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 1 month ago (2013-11-12 19:53:07 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/teravest@chromium.org/69363002/330001
7 years, 1 month ago (2013-11-12 20:58:08 UTC) #13
teravest
7 years, 1 month ago (2013-11-12 22:56:33 UTC) #14
Message was sent while issue was closed.
Committed patchset #4 manually as r234659 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698