| Index: Source/platform/graphics/gpu/DrawingBuffer.cpp
|
| diff --git a/Source/platform/graphics/gpu/DrawingBuffer.cpp b/Source/platform/graphics/gpu/DrawingBuffer.cpp
|
| index e0254864410b0dfe8179a2fd76eea549e89f1293..4967200760aa47b3e78f2992546dea0e3f31bb55 100644
|
| --- a/Source/platform/graphics/gpu/DrawingBuffer.cpp
|
| +++ b/Source/platform/graphics/gpu/DrawingBuffer.cpp
|
| @@ -191,12 +191,18 @@ blink::WebGraphicsContext3D* DrawingBuffer::context()
|
|
|
| bool DrawingBuffer::prepareMailbox(blink::WebExternalTextureMailbox* outMailbox, blink::WebExternalBitmap* bitmap)
|
| {
|
| - // prepareMailbox() is always called after layout.
|
| - ASSERT(!m_destructionInProgress);
|
| -
|
| if (!m_contentsChanged)
|
| return false;
|
|
|
| + if (m_destructionInProgress) {
|
| + // It can be hit in the following sequence.
|
| + // 1. WebGL draws something.
|
| + // 2. The compositor begins the frame.
|
| + // 3. Javascript makes a context lost using WEBGL_lose_context extension.
|
| + // 4. Here.
|
| + return false;
|
| + }
|
| +
|
| m_context->makeContextCurrent();
|
|
|
| // Resolve the multisampled buffer into m_colorBuffer texture.
|
|
|