Commit d6f00bd9 authored by Justin Novosad's avatar Justin Novosad Committed by Commit Bot

Fix crash in 2D canvas caused by lost context

BUG=854068

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ie19b1595538a6dad8d8c095233fe16d9383cfd00
Reviewed-on: https://chromium-review.googlesource.com/1108347Reviewed-by: default avatarFernando Serboncini <fserb@chromium.org>
Commit-Queue: Justin Novosad <junov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568959}
parent dbd89b4c
...@@ -525,7 +525,10 @@ void Canvas2DLayerBridge::FlushRecording() { ...@@ -525,7 +525,10 @@ void Canvas2DLayerBridge::FlushRecording() {
// Rastering the recording would have locked images, since we've flushed // Rastering the recording would have locked images, since we've flushed
// all recorded ops, we should relase all locked images as well. // all recorded ops, we should relase all locked images as well.
GetOrCreateResourceProvider()->ReleaseLockedImages(); // A new null check on the resource provider is necessary just in case
// the playback crashed the context.
if (GetOrCreateResourceProvider())
GetOrCreateResourceProvider()->ReleaseLockedImages();
if (is_deferral_enabled_) if (is_deferral_enabled_)
StartRecording(); StartRecording();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment