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

Issue 23688004: Change the PepperInProcessRouter to defer resource destruction messages. (Closed)

Created:
7 years, 3 months ago by bbudge
Modified:
7 years, 3 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

Change the PepperInProcessRouter to defer resource destruction messages. This changes the in process "proxy" so it posts tasks to send resource destruction messages instead of calling them directly. This prevents several kinds of reentrancy into the plugin-side code. In this case, when a URLLoader is released, the plugin can finish before the host cancels the load and potentially deletes the instance. BUG=276368 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=222614

Patch Set 1 #

Total comments: 1

Patch Set 2 : More detailed comment, only change in-process behavior. #

Total comments: 1

Patch Set 3 : Change in-process router to post tasks for async messages to host. #

Total comments: 1

Patch Set 4 : Attempt to fix in-process router #

Patch Set 5 : Restrict change to resource destruction messages. #

Patch Set 6 : Follow previous behavior more closely. #

Total comments: 1

Patch Set 7 : Comment explaining fix. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -3 lines) Patch
M content/renderer/pepper/pepper_in_process_router.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/pepper/pepper_in_process_router.cc View 1 2 3 4 5 6 2 chunks +23 lines, -3 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
bbudge
Yuzhu for OWNERS review. Tom since he's done similar fixes in the past. Abhishek FYI
7 years, 3 months ago (2013-09-06 20:20:56 UTC) #1
yzshen1
LGTM with nits. https://codereview.chromium.org/23688004/diff/1/ppapi/proxy/url_loader_resource.cc File ppapi/proxy/url_loader_resource.cc (right): https://codereview.chromium.org/23688004/diff/1/ppapi/proxy/url_loader_resource.cc#newcode71 ppapi/proxy/url_loader_resource.cc:71: // Destroying a URLLoaderResource can cause ...
7 years, 3 months ago (2013-09-06 22:07:46 UTC) #2
bbudge
I made the comment more detailed and only change in-process behavior. Is the code to ...
7 years, 3 months ago (2013-09-07 00:29:48 UTC) #3
Tom Sepez
LGTM with nit. https://codereview.chromium.org/23688004/diff/16001/ppapi/proxy/url_loader_resource.cc File ppapi/proxy/url_loader_resource.cc (right): https://codereview.chromium.org/23688004/diff/16001/ppapi/proxy/url_loader_resource.cc#newcode78 ppapi/proxy/url_loader_resource.cc:78: if (PpapiGlobals::Get()->GetProxyLock() == NULL) nit: (!PpapiGlobals::Get()->GetProxyLock())
7 years, 3 months ago (2013-09-09 21:05:01 UTC) #4
bbudge
Sorry for the change in direction. The previous approach helped but it was still difficult ...
7 years, 3 months ago (2013-09-10 00:05:14 UTC) #5
yzshen1
On 2013/09/10 00:05:14, bbudge1 wrote: > Sorry for the change in direction. The previous approach ...
7 years, 3 months ago (2013-09-10 00:26:17 UTC) #6
bbudge
Sadly, this fails browser_tests for Graphics2D, FileIO, and FileRef. It appears to be when the ...
7 years, 3 months ago (2013-09-10 01:06:37 UTC) #7
dmichael (off chromium)
If you look at all the test failures, they are the first call using the ...
7 years, 3 months ago (2013-09-10 18:34:34 UTC) #8
bbudge
On 2013/09/10 18:34:34, dmichael wrote: > If you look at all the test failures, they ...
7 years, 3 months ago (2013-09-10 19:59:09 UTC) #9
yzshen1
Hi, I guess the failure is because in PepperInProcessRouter::SendToHost() sync messages are handled directly while ...
7 years, 3 months ago (2013-09-10 20:05:03 UTC) #10
dmichael (off chromium)
On Tue, Sep 10, 2013 at 2:05 PM, Yuzhu Shen <yzshen@chromium.org> wrote: > Hi, > ...
7 years, 3 months ago (2013-09-10 20:13:49 UTC) #11
yzshen1
On Tue, Sep 10, 2013 at 1:13 PM, David Michael <dmichael@chromium.org>wrote: > On Tue, Sep ...
7 years, 3 months ago (2013-09-10 20:25:23 UTC) #12
dmichael(do not use this one)
On Tue, Sep 10, 2013 at 2:25 PM, Yuzhu Shen <yzshen@chromium.org> wrote: > > > ...
7 years, 3 months ago (2013-09-10 21:20:59 UTC) #13
dmichael(do not use this one)
On Tue, Sep 10, 2013 at 2:25 PM, Yuzhu Shen <yzshen@chromium.org> wrote: > > > ...
7 years, 3 months ago (2013-09-10 21:24:34 UTC) #14
dmichael (off chromium)
Umm, weird. I was playing around locally and used "git cl patch" to get this ...
7 years, 3 months ago (2013-09-10 21:38:18 UTC) #15
yzshen1
Thanks, David! It is hard to tell whether it introduces new problems. But I don't ...
7 years, 3 months ago (2013-09-10 21:47:03 UTC) #16
bbudge
I've restricted the change to resource destruction messages. This should be all I need to ...
7 years, 3 months ago (2013-09-11 14:06:13 UTC) #17
dmichael (off chromium)
I think this is a good approach. The Destroy message should be the last for ...
7 years, 3 months ago (2013-09-11 15:44:17 UTC) #18
yzshen1
On 2013/09/11 15:44:17, dmichael wrote: > I think this is a good approach. The Destroy ...
7 years, 3 months ago (2013-09-11 16:37:07 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bbudge@chromium.org/23688004/64001
7 years, 3 months ago (2013-09-11 17:14:10 UTC) #20
commit-bot: I haz the power
7 years, 3 months ago (2013-09-11 20:08:09 UTC) #21
Message was sent while issue was closed.
Change committed as 222614

Powered by Google App Engine
This is Rietveld 408576698