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

Issue 8016008: Make much of the proxy thread-safe with 1 great big lock. (Closed)

Created:
9 years, 3 months ago by dmichael (off chromium)
Modified:
9 years, 2 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

Add global lock for Enter* classes. Add ScopedProxyLock for non-thunk proxies. Add multi-threading test for PPB_Var. BUG=92909 TEST=None yet Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=104931

Patch Set 1 #

Patch Set 2 : Update core and var proxies to lock. Add Var test. #

Patch Set 3 : Remove unneeded member variable #

Patch Set 4 : Make host-side not lock, make locking off by default #

Patch Set 5 : Add enable_pepper_threading flag in gyp, default to off #

Patch Set 6 : Oops, forgot to add proxy_lock.* #

Patch Set 7 : Move setting the lock to the resource tracker, which really is global #

Patch Set 8 : Undo changes to PluginDispatcher #

Patch Set 9 : Make Reset conditional (just for consistency) #

Patch Set 10 : Fix a couple of bad comments. #

Total comments: 2

Patch Set 11 : review fix #

Patch Set 12 : merge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+389 lines, -44 lines) Patch
M build/common.gypi View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +9 lines, -0 lines 0 comments Download
M ppapi/ppapi_shared.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M ppapi/proxy/plugin_resource_tracker.h View 1 2 3 4 5 6 2 chunks +4 lines, -0 lines 0 comments Download
M ppapi/proxy/plugin_resource_tracker.cc View 1 2 3 4 5 6 7 8 2 chunks +9 lines, -0 lines 0 comments Download
M ppapi/proxy/ppb_core_proxy.cc View 1 2 3 4 5 6 2 chunks +3 lines, -0 lines 0 comments Download
M ppapi/proxy/ppb_var_proxy.cc View 1 2 3 4 5 6 2 chunks +5 lines, -0 lines 0 comments Download
M ppapi/proxy/ppb_var_unittest.cc View 1 2 3 4 2 chunks +199 lines, -28 lines 0 comments Download
A ppapi/shared_impl/proxy_lock.h View 1 2 3 4 5 6 7 8 9 1 chunk +80 lines, -0 lines 0 comments Download
A ppapi/shared_impl/proxy_lock.cc View 1 2 3 4 5 1 chunk +35 lines, -0 lines 0 comments Download
M ppapi/thunk/enter.h View 1 2 3 4 5 6 7 8 9 10 7 chunks +42 lines, -16 lines 0 comments Download
M ppapi/thunk/enter.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
dmichael (off chromium)
Next up: - Lots and lots of testing. - Support for blocking completion callbacks. Note ...
9 years, 2 months ago (2011-09-26 21:36:53 UTC) #1
dmichael (off chromium)
No need to hurry on this... it looks like the Graphics2D ui_test is hanging on ...
9 years, 2 months ago (2011-09-26 22:58:56 UTC) #2
brettw
Whenever we do a blocking send we need to unlock so the browser can call ...
9 years, 2 months ago (2011-09-28 19:58:42 UTC) #3
dmichael(do not use this one)
On Wed, Sep 28, 2011 at 1:58 PM, <brettw@chromium.org> wrote: > Whenever we do a ...
9 years, 2 months ago (2011-09-28 20:20:40 UTC) #4
brettw
On Wed, Sep 28, 2011 at 1:20 PM, David Michael <dmichael@google.com> wrote: > > On ...
9 years, 2 months ago (2011-09-28 20:24:00 UTC) #5
dmichael (off chromium)
On Wed, Sep 28, 2011 at 2:23 PM, Brett Wilson <brettw@chromium.org> wrote: > On Wed, ...
9 years, 2 months ago (2011-09-28 20:39:25 UTC) #6
brettw
On Wed, Sep 28, 2011 at 1:39 PM, David Michael <dmichael@chromium.org> wrote: > > On ...
9 years, 2 months ago (2011-09-28 21:10:55 UTC) #7
dmichael (off chromium)
Okay, I've made the following changes: - Locking only happens in the plugin side of ...
9 years, 2 months ago (2011-10-06 16:01:48 UTC) #8
brettw
Keep in mind there will be multiple dispatchers in the plugin process, one for each ...
9 years, 2 months ago (2011-10-07 00:01:58 UTC) #9
dmichael (off chromium)
On 2011/10/07 00:01:58, brettw wrote: > Keep in mind there will be multiple dispatchers in ...
9 years, 2 months ago (2011-10-07 22:17:04 UTC) #10
brettw
You misunderstood a bit. There is one plugin process for each native plugin DLL. Pepper ...
9 years, 2 months ago (2011-10-07 22:39:17 UTC) #11
dmichael (off chromium)
On Fri, Oct 7, 2011 at 4:39 PM, <brettw@chromium.org> wrote: > You misunderstood a bit. ...
9 years, 2 months ago (2011-10-08 02:46:16 UTC) #12
brettw
Many plugins create many hundreds of resources. This will equate to many hundreds of locks, ...
9 years, 2 months ago (2011-10-08 05:13:19 UTC) #13
dmichael (off chromium)
On Fri, Oct 7, 2011 at 11:13 PM, <brettw@chromium.org> wrote: > Many plugins create many ...
9 years, 2 months ago (2011-10-09 02:13:23 UTC) #14
brettw
Sweet :) You plan sounds good to me.
9 years, 2 months ago (2011-10-09 03:33:28 UTC) #15
dmichael (off chromium)
I used the ProxyLock class I already defined and just moved setting the lock in ...
9 years, 2 months ago (2011-10-10 18:10:14 UTC) #16
brettw
9 years, 2 months ago (2011-10-11 18:25:09 UTC) #17
LGTM

http://codereview.chromium.org/8016008/diff/35002/ppapi/thunk/enter.h
File ppapi/thunk/enter.h (right):

http://codereview.chromium.org/8016008/diff/35002/ppapi/thunk/enter.h#newcode56
ppapi/thunk/enter.h:56: // TODO(brettw) assert the lock is held.
Nice try :)
brettw -> dmichael

http://codereview.chromium.org/8016008/diff/35002/ppapi/thunk/enter.h#newcode173
ppapi/thunk/enter.h:173: class PPAPI_THUNK_EXPORT EnterInstance
For future reference, I think some of the places this is being used is wrong (in
case you run into problems). I think we'll need to make a new
EnterInstanceNoLock and have some callers use.

Powered by Google App Engine
This is Rietveld 408576698