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

Issue 447113004: Fix crash in GotAcceleratedIOSurfaceFrame (Closed)

Created:
6 years, 4 months ago by ccameron
Modified:
6 years, 4 months ago
CC:
chromium-reviews, yusukes+watch_chromium.org, yukishiino+watch_chromium.org, jam, penghuang+watch_chromium.org, sievers+watch_chromium.org, jbauman+watch_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, kalyank, piman+watch_chromium.org, danakj+watch_chromium.org, James Su, miu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Fix crash in GotAcceleratedIOSurfaceFrame The root cause here is that it was assumed that creation of a CompositingIOSurfaceMac and CompositingIOSurfaceContext cannot not fail when, in fact, it can. This resulted in a NULL reference later on. Fix part of this by making CompositingIOSurfaceLayer's init function fail if the CompositingIOSurfaceContext fails. Fix the remaining part of this by removing the NULL references from BrowserCompositorViewMacInternal::GotAcceleratedIOSurfaceFrame, and make the function call AcceleratedLayerHitError if any errors are encountered, which will cause the layer to re-attempt the frame with a new context. Also, split AcceleratedLayerDidDrawFrame into two functions, AcceleratedLayerDidDrawFrame and AcceleratedLayerHitError, rather than parameterizing success using a bool, since that naming was deceptive. BUG=401630 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=288328

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+131 lines, -65 lines) Patch
M content/browser/compositor/browser_compositor_view_private_mac.h View 2 chunks +12 lines, -1 line 0 comments Download
M content/browser/compositor/browser_compositor_view_private_mac.mm View 6 chunks +86 lines, -57 lines 0 comments Download
M content/browser/renderer_host/compositing_iosurface_layer_mac.h View 1 chunk +10 lines, -1 line 0 comments Download
M content/browser/renderer_host/compositing_iosurface_layer_mac.mm View 2 chunks +11 lines, -2 lines 2 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.h View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.mm View 1 chunk +10 lines, -3 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
ccameron
Somewhere along the line here, I assumed that the IOSurface/Context creation functions could not fail ...
6 years, 4 months ago (2014-08-07 21:14:27 UTC) #1
Ken Russell (switch to Gerrit)
LGTM https://codereview.chromium.org/447113004/diff/1/content/browser/renderer_host/compositing_iosurface_layer_mac.mm File content/browser/renderer_host/compositing_iosurface_layer_mac.mm (right): https://codereview.chromium.org/447113004/diff/1/content/browser/renderer_host/compositing_iosurface_layer_mac.mm#newcode188 content/browser/renderer_host/compositing_iosurface_layer_mac.mm:188: LOG(ERROR) << "Failed create CompositingIOSurfaceContext"; I wonder whether ...
6 years, 4 months ago (2014-08-07 22:11:44 UTC) #2
ccameron
Thanks! https://codereview.chromium.org/447113004/diff/1/content/browser/renderer_host/compositing_iosurface_layer_mac.mm File content/browser/renderer_host/compositing_iosurface_layer_mac.mm (right): https://codereview.chromium.org/447113004/diff/1/content/browser/renderer_host/compositing_iosurface_layer_mac.mm#newcode188 content/browser/renderer_host/compositing_iosurface_layer_mac.mm:188: LOG(ERROR) << "Failed create CompositingIOSurfaceContext"; On 2014/08/07 22:11:44, ...
6 years, 4 months ago (2014-08-07 22:28:25 UTC) #3
Ken Russell (switch to Gerrit)
On 2014/08/07 22:28:25, ccameron1 wrote: > Thanks! > > https://codereview.chromium.org/447113004/diff/1/content/browser/renderer_host/compositing_iosurface_layer_mac.mm > File content/browser/renderer_host/compositing_iosurface_layer_mac.mm (right): > ...
6 years, 4 months ago (2014-08-07 22:34:01 UTC) #4
ccameron
On 2014/08/07 22:34:01, Ken Russell wrote: > On 2014/08/07 22:28:25, ccameron1 wrote: > > Thanks! ...
6 years, 4 months ago (2014-08-07 22:42:56 UTC) #5
ccameron
The CQ bit was checked by ccameron@chromium.org
6 years, 4 months ago (2014-08-08 08:37:05 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ccameron@chromium.org/447113004/1
6 years, 4 months ago (2014-08-08 08:38:09 UTC) #7
commit-bot: I haz the power
6 years, 4 months ago (2014-08-08 11:06:46 UTC) #8
Message was sent while issue was closed.
Change committed as 288328

Powered by Google App Engine
This is Rietveld 408576698