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

Issue 3185004: Cleanups to well-behaved accelerated plugin CL requested by... (Closed)

Created:
10 years, 4 months ago by Ken Russell (switch to Gerrit)
Modified:
9 years, 7 months ago
Reviewers:
stuartmorgan, Nico
CC:
chromium-reviews, John Grabowski, ben+cc_chromium.org, brettw-cc_chromium.org, pam+watch_chromium.org, darin-cc_chromium.org, pink (ping after 24hrs)
Visibility:
Public.

Description

Cleanups to well-behaved accelerated plugin CL requested by stuartmorgan in http://codereview.chromium.org/3010054 . BUG=51748 TEST=visited YouTube and ensured video shows up; 3D CSS demos; WebGL demos Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=56277

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 10

Patch Set 3 : '' #

Patch Set 4 : '' #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+69 lines, -96 lines) Patch
M chrome/browser/renderer_host/accelerated_surface_container_mac.h View 1 2 2 chunks +10 lines, -3 lines 0 comments Download
M chrome/browser/renderer_host/accelerated_surface_container_mac.cc View 1 2 4 chunks +18 lines, -4 lines 0 comments Download
M chrome/browser/renderer_host/accelerated_surface_container_manager_mac.h View 1 2 4 chunks +6 lines, -13 lines 0 comments Download
M chrome/browser/renderer_host/accelerated_surface_container_manager_mac.cc View 1 2 2 chunks +2 lines, -27 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view_mac.h View 3 chunks +2 lines, -8 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view_mac.mm View 1 2 14 chunks +31 lines, -41 lines 3 comments Download

Messages

Total messages: 7 (0 generated)
Ken Russell (switch to Gerrit)
Please review. Thanks.
10 years, 4 months ago (2010-08-14 02:16:15 UTC) #1
stuartmorgan
Just a few small things... thanks for doing this! http://codereview.chromium.org/3185004/diff/6001/7004 File chrome/browser/renderer_host/accelerated_surface_container_manager_mac.h (right): http://codereview.chromium.org/3185004/diff/6001/7004#newcode37 chrome/browser/renderer_host/accelerated_surface_container_manager_mac.h:37: ...
10 years, 4 months ago (2010-08-16 15:22:35 UTC) #2
Ken Russell (switch to Gerrit)
http://codereview.chromium.org/3185004/diff/6001/7004 File chrome/browser/renderer_host/accelerated_surface_container_manager_mac.h (right): http://codereview.chromium.org/3185004/diff/6001/7004#newcode37 chrome/browser/renderer_host/accelerated_surface_container_manager_mac.h:37: // Indicates whether the given PluginWindowHandle is a "root" ...
10 years, 4 months ago (2010-08-16 21:59:22 UTC) #3
stuartmorgan
LGTM
10 years, 4 months ago (2010-08-16 22:38:18 UTC) #4
Nico
Thanks for doing this! http://codereview.chromium.org/3185004/diff/13002/17006 File chrome/browser/renderer_host/render_widget_host_view_mac.mm (right): http://codereview.chromium.org/3185004/diff/13002/17006#newcode437 chrome/browser/renderer_host/render_widget_host_view_mac.mm:437: DCHECK(plugin_views_.end() != it); what's the ...
10 years, 4 months ago (2010-08-19 22:24:22 UTC) #5
Ken Russell (switch to Gerrit)
http://codereview.chromium.org/3185004/diff/13002/17006 File chrome/browser/renderer_host/render_widget_host_view_mac.mm (right): http://codereview.chromium.org/3185004/diff/13002/17006#newcode437 chrome/browser/renderer_host/render_widget_host_view_mac.mm:437: DCHECK(plugin_views_.end() != it); On 2010/08/19 22:24:22, Nico wrote: > ...
10 years, 4 months ago (2010-08-19 22:28:47 UTC) #6
stuartmorgan
10 years, 4 months ago (2010-08-19 22:35:59 UTC) #7
http://codereview.chromium.org/3185004/diff/13002/17006
File chrome/browser/renderer_host/render_widget_host_view_mac.mm (right):

http://codereview.chromium.org/3185004/diff/13002/17006#newcode437
chrome/browser/renderer_host/render_widget_host_view_mac.mm:437:
DCHECK(plugin_views_.end() != it);
On 2010/08/19 22:24:22, Nico wrote:
> what's the rationale for replacing these CHECKs with DCHECKs and early
returns?
> If this is ever hit, this is a serious problem.
> 
> See
>
http://www.chromium.org/developers/coding-style#TOC-CHECK-vs-DCHECK-and-NOTRE...

From that document:

"Sometimes it is preferable to force a crash to happen via CHECK. Those cases
include situations where you are dealing with untrusted input (provided there is
no reasonable recovery path) and the consequences of continuing execution could
result in a security vulnerability."

What is the security vulnerability of just ignoring an attempt to move a plugin
that doesn't exist? I can't see what the problem is here that is so bad that
crashing the user's browser is our most graceful option.

I'm fine with DLOG instead of DCHECK, but either seems far, far better than
CHECK.

Powered by Google App Engine
This is Rietveld 408576698