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

Unified Diff: Source/platform/graphics/Canvas2DLayerBridge.cpp

Issue 452883002: Fix crash caused by Canvas2DLayerBridge::mailboxReleased (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/Canvas2DLayerBridge.cpp
diff --git a/Source/platform/graphics/Canvas2DLayerBridge.cpp b/Source/platform/graphics/Canvas2DLayerBridge.cpp
index 68f174a32501db9df047b0fb9adf65509b8f3f25..2364924b5e035ec1731b2fd82e4dbf0ca8f89266 100644
--- a/Source/platform/graphics/Canvas2DLayerBridge.cpp
+++ b/Source/platform/graphics/Canvas2DLayerBridge.cpp
@@ -516,6 +516,9 @@ void Canvas2DLayerBridge::mailboxReleased(const blink::WebExternalTextureMailbox
size_t i = mailboxInfo - m_mailboxes.begin();
m_mailboxes.remove(i);
Canvas2DLayerManager::get().layerTransientResourceAllocationChanged(this);
+ // Here we need to return early since mailboxInfo removal would
+ // also clear m_parentLayerBridge reference.
+ return;
} else {
mailboxInfo->m_status = MailboxReleased;
m_releasedMailboxInfoIndex = mailboxInfo - m_mailboxes.begin();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698