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

Issue 338050: Ensure that all NPN_PluginThreadAsyncCall callbacks are invoked before NPP_De... (Closed)

Created:
11 years, 1 month ago by apatrick
Modified:
9 years, 7 months ago
Reviewers:
jam
CC:
chromium-reviews_googlegroups.com, darin (slow to review)
Visibility:
Public.

Description

Ensure that NPN_PluginThreadAsyncCall callbacks are not invoked after NPP_Destroy. TEST=none BUG=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=30628

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Total comments: 2

Patch Set 6 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+181 lines, -1 line) Patch
A chrome/test/data/npapi/plugin_thread_async_call.html View 1 chunk +42 lines, -0 lines 0 comments Download
M chrome/test/ui/npapi_uitest.cc View 4 5 1 chunk +7 lines, -0 lines 0 comments Download
M webkit/glue/plugins/plugin_instance.cc View 1 2 3 4 5 1 chunk +3 lines, -1 line 0 comments Download
M webkit/glue/plugins/test/plugin_client.cc View 4 5 2 chunks +4 lines, -0 lines 0 comments Download
A webkit/glue/plugins/test/plugin_thread_async_call_test.h View 4 5 1 chunk +31 lines, -0 lines 0 comments Download
A webkit/glue/plugins/test/plugin_thread_async_call_test.cc View 4 1 chunk +92 lines, -0 lines 0 comments Download
M webkit/tools/test_shell/test_shell.gyp View 4 5 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
apatrick
What do you think about doing it this way? Is pumping the message loop in ...
11 years, 1 month ago (2009-10-27 20:15:58 UTC) #1
jam
I'm not sure what side effects can exist because of this. Perhaps it will lead ...
11 years, 1 month ago (2009-10-27 20:23:15 UTC) #2
apatrick
If I use a ScopedRunnableMethodFactory to schedule the async callback, is it guaranteed that the ...
11 years, 1 month ago (2009-10-27 20:32:15 UTC) #3
apatrick
Unfortunately ScopedRunnableMethodFactory isn't thread safe and NPN_PluginThreadAsyncCall can be called from any thread. I'll fall ...
11 years, 1 month ago (2009-10-27 21:05:55 UTC) #4
apatrick
Uploaded.
11 years, 1 month ago (2009-10-27 22:20:02 UTC) #5
jam
The change lgtm, can a regression test be added? Thanks
11 years, 1 month ago (2009-10-28 06:46:48 UTC) #6
jam
You can call RevokeAll() on the factor before calling NPP_Destroy, which will make the runnable ...
11 years, 1 month ago (2009-10-28 15:34:51 UTC) #7
apatrick
I've been thinking about that. Two problems... How could I arrange things to guarantee that ...
11 years, 1 month ago (2009-10-28 16:55:24 UTC) #8
apatrick
Confirmed on the second point. The npapi tests signal success or failure by invoking javascript ...
11 years, 1 month ago (2009-10-28 17:37:31 UTC) #9
jam
On 2009/10/28 17:37:31, apatrick wrote: > Confirmed on the second point. The npapi tests signal ...
11 years, 1 month ago (2009-10-28 17:51:42 UTC) #10
jam
ah yes, I forgot that SRMF isn't thread safe. Checking webplugin_ without pumping the message ...
11 years, 1 month ago (2009-10-28 18:35:11 UTC) #11
apatrick
Added test.
11 years, 1 month ago (2009-10-28 20:03:00 UTC) #12
jam
11 years, 1 month ago (2009-10-29 22:16:30 UTC) #13
lgtm

Sorry for the delay, just saw this.

http://codereview.chromium.org/338050/diff/4006/4011
File webkit/glue/plugins/test/plugin_thread_async_call_test.h (right):

http://codereview.chromium.org/338050/diff/4006/4011#newcode1
Line 1: // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
nit: should just be 2009

http://codereview.chromium.org/338050/diff/4006/4011#newcode11
Line 11: #include "base/time.h"
nit: the first three includes don't look like they're needed

Powered by Google App Engine
This is Rietveld 408576698