Index: Source/platform/graphics/gpu/DrawingBuffer.cpp |
diff --git a/Source/platform/graphics/gpu/DrawingBuffer.cpp b/Source/platform/graphics/gpu/DrawingBuffer.cpp |
index 8b013993fa60f04726134cfbe2c9c91581745d8a..aca1f945bfd666f168738bc11015bc9537f2fa5a 100644 |
--- a/Source/platform/graphics/gpu/DrawingBuffer.cpp |
+++ b/Source/platform/graphics/gpu/DrawingBuffer.cpp |
@@ -277,12 +277,7 @@ bool DrawingBuffer::prepareMailbox(blink::WebExternalTextureMailbox* outMailbox, |
void DrawingBuffer::mailboxReleased(const blink::WebExternalTextureMailbox& mailbox, bool lostResource) |
{ |
- if (lostResource) { |
- // TODO(hmin): handle the case if the resource is lost. |
- return; |
- } |
- |
- if (m_destructionInProgress) { |
+ if (m_destructionInProgress || m_context->isContextLost() || lostResource) { |
mailboxReleasedWhileDestructionInProgress(mailbox); |
return; |
} |