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

Issue 10855141: Fix race condition with windowless plugin buffers. The problem, which is already fixed for Mac, is … (Closed)

Created:
8 years, 4 months ago by jam
Modified:
8 years, 4 months ago
Reviewers:
Tom Hudson, piman, reed1
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

Fix race condition with windowless plugin buffers. The problem, which is already fixed for Mac, is that the buffers can be deleted during a paint because of a resize during an NPN_Evaluate call. So keep a local reference. BUG=139462 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=151734

Patch Set 1 #

Patch Set 2 : #

Total comments: 6

Patch Set 3 : actual fix #

Patch Set 4 : smaller fix! #

Patch Set 5 : real fix #

Patch Set 6 : #

Patch Set 7 : #

Total comments: 4

Patch Set 8 : unsucky comments #

Patch Set 9 : fix linux #

Unified diffs Side-by-side diffs Delta from patch set Stats (+147 lines, -38 lines) Patch
M content/browser/plugin_browsertest.cc View 1 2 3 4 5 6 7 1 chunk +7 lines, -0 lines 0 comments Download
M content/plugin/webplugin_proxy.h View 1 2 3 4 5 6 7 8 5 chunks +19 lines, -7 lines 0 comments Download
M content/plugin/webplugin_proxy.cc View 1 2 3 4 5 6 7 8 8 chunks +44 lines, -27 lines 0 comments Download
A content/test/data/npapi/resize_during_paint.html View 1 2 3 4 5 1 chunk +40 lines, -0 lines 0 comments Download
M webkit/plugins/npapi/test/plugin_test.h View 1 2 3 4 5 6 2 chunks +1 line, -1 line 0 comments Download
M webkit/plugins/npapi/test/plugin_test_factory.cc View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M webkit/plugins/npapi/test/plugin_windowless_test.h View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M webkit/plugins/npapi/test/plugin_windowless_test.cc View 1 2 3 4 5 6 7 7 chunks +31 lines, -2 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
jam
I spent half a day trying to repro this race condition, but I couldn't (it's ...
8 years, 4 months ago (2012-08-14 17:09:56 UTC) #1
reed1
lgtm http://codereview.chromium.org/10855141/diff/5002/content/plugin/webplugin_proxy.cc File content/plugin/webplugin_proxy.cc (right): http://codereview.chromium.org/10855141/diff/5002/content/plugin/webplugin_proxy.cc#newcode388 content/plugin/webplugin_proxy.cc:388: skia::PlatformCanvas* saved_canvas = windowless_canvas(); Do we want to ...
8 years, 4 months ago (2012-08-14 17:19:04 UTC) #2
jam
http://codereview.chromium.org/10855141/diff/5002/content/plugin/webplugin_proxy.cc File content/plugin/webplugin_proxy.cc (right): http://codereview.chromium.org/10855141/diff/5002/content/plugin/webplugin_proxy.cc#newcode388 content/plugin/webplugin_proxy.cc:388: skia::PlatformCanvas* saved_canvas = windowless_canvas(); On 2012/08/14 17:19:04, reed1 wrote: ...
8 years, 4 months ago (2012-08-14 17:29:30 UTC) #3
Tom Hudson
http://codereview.chromium.org/10855141/diff/5002/content/plugin/webplugin_proxy.cc File content/plugin/webplugin_proxy.cc (right): http://codereview.chromium.org/10855141/diff/5002/content/plugin/webplugin_proxy.cc#newcode388 content/plugin/webplugin_proxy.cc:388: skia::PlatformCanvas* saved_canvas = windowless_canvas(); On 2012/08/14 17:29:30, John Abd-El-Malek ...
8 years, 4 months ago (2012-08-14 17:34:55 UTC) #4
jam
http://codereview.chromium.org/10855141/diff/5002/content/plugin/webplugin_proxy.cc File content/plugin/webplugin_proxy.cc (right): http://codereview.chromium.org/10855141/diff/5002/content/plugin/webplugin_proxy.cc#newcode388 content/plugin/webplugin_proxy.cc:388: skia::PlatformCanvas* saved_canvas = windowless_canvas(); On 2012/08/14 17:34:55, Tom Hudson ...
8 years, 4 months ago (2012-08-14 17:40:28 UTC) #5
aarya
On 2012/08/14 17:34:55, Tom Hudson wrote: > http://codereview.chromium.org/10855141/diff/5002/content/plugin/webplugin_proxy.cc > File content/plugin/webplugin_proxy.cc (right): > > http://codereview.chromium.org/10855141/diff/5002/content/plugin/webplugin_proxy.cc#newcode388 ...
8 years, 4 months ago (2012-08-14 18:12:18 UTC) #6
jam
http://codereview.chromium.org/10855141/diff/5002/content/plugin/webplugin_proxy.cc File content/plugin/webplugin_proxy.cc (right): http://codereview.chromium.org/10855141/diff/5002/content/plugin/webplugin_proxy.cc#newcode388 content/plugin/webplugin_proxy.cc:388: skia::PlatformCanvas* saved_canvas = windowless_canvas(); On 2012/08/14 17:40:28, John Abd-El-Malek ...
8 years, 4 months ago (2012-08-14 20:43:08 UTC) #7
Tom Hudson
Feeding "scoped_ptr<skia::PlatformCanvas> package:^chrome$ file:^src/" to code search gives 13 hits, 4 of which are other ...
8 years, 4 months ago (2012-08-14 21:01:19 UTC) #8
Tom Hudson
Mike points out that we do support SkAutoTUnref<>. We're not likely to accept a change ...
8 years, 4 months ago (2012-08-14 21:04:23 UTC) #9
jam
btw it looks like with this change, the SkCanvas leaks and is never destructed, so ...
8 years, 4 months ago (2012-08-14 21:08:44 UTC) #10
jam
On 2012/08/14 21:04:23, Tom Hudson wrote: > Mike points out that we do support SkAutoTUnref<>. ...
8 years, 4 months ago (2012-08-14 21:10:31 UTC) #11
reed1
On 2012/08/14 21:10:31, John Abd-El-Malek wrote: > On 2012/08/14 21:04:23, Tom Hudson wrote: > > ...
8 years, 4 months ago (2012-08-14 21:17:23 UTC) #12
jam
please see the latest patchset (4). you can diff it with patchset 2. 2 had ...
8 years, 4 months ago (2012-08-14 21:29:58 UTC) #13
Tom Hudson
From the fact that you named patchset 5 the "real fix", I assume that you ...
8 years, 4 months ago (2012-08-14 22:18:00 UTC) #14
jam
On 2012/08/14 22:18:00, Tom Hudson wrote: > From the fact that you named patchset 5 ...
8 years, 4 months ago (2012-08-14 22:23:21 UTC) #15
jam
added regression test
8 years, 4 months ago (2012-08-14 22:44:04 UTC) #16
Tom Hudson
LGTM http://codereview.chromium.org/10855141/diff/8/webkit/plugins/npapi/test/plugin_windowless_test.cc File webkit/plugins/npapi/test/plugin_windowless_test.cc (right): http://codereview.chromium.org/10855141/diff/8/webkit/plugins/npapi/test/plugin_windowless_test.cc#newcode128 webkit/plugins/npapi/test/plugin_windowless_test.cc:128: // _it's_ painting (as opposed to the plugin). ...
8 years, 4 months ago (2012-08-15 17:04:00 UTC) #17
jam
Ironically enough, even though the new test is passing on Linux trybots (where it uses ...
8 years, 4 months ago (2012-08-15 17:28:10 UTC) #18
Tom Hudson
http://codereview.chromium.org/10855141/diff/8/webkit/plugins/npapi/test/plugin_windowless_test.cc File webkit/plugins/npapi/test/plugin_windowless_test.cc (right): http://codereview.chromium.org/10855141/diff/8/webkit/plugins/npapi/test/plugin_windowless_test.cc#newcode128 webkit/plugins/npapi/test/plugin_windowless_test.cc:128: // _it's_ painting (as opposed to the plugin). So ...
8 years, 4 months ago (2012-08-15 17:59:04 UTC) #19
jam
http://codereview.chromium.org/10855141/diff/8/webkit/plugins/npapi/test/plugin_windowless_test.cc File webkit/plugins/npapi/test/plugin_windowless_test.cc (right): http://codereview.chromium.org/10855141/diff/8/webkit/plugins/npapi/test/plugin_windowless_test.cc#newcode128 webkit/plugins/npapi/test/plugin_windowless_test.cc:128: // _it's_ painting (as opposed to the plugin). On ...
8 years, 4 months ago (2012-08-15 18:22:22 UTC) #20
Tom Hudson
Yep, I was getting the old version. New is much better. Thanks.
8 years, 4 months ago (2012-08-15 18:33:34 UTC) #21
jam
+piman for the Linux bits (specifically, diff of patchset 8 and 9)
8 years, 4 months ago (2012-08-15 19:09:07 UTC) #22
piman
8 years, 4 months ago (2012-08-15 19:15:50 UTC) #23
lgtm

Powered by Google App Engine
This is Rietveld 408576698