| Index: Source/core/html/canvas/WebGLLoseContext.cpp
|
| diff --git a/Source/core/html/canvas/WebGLLoseContext.cpp b/Source/core/html/canvas/WebGLLoseContext.cpp
|
| index 7fe322272f7fffb20f6689c45e9dab42ba228dec..51e967749b981eb1e7c6ea2a2ac41eb7c9d4bfe9 100644
|
| --- a/Source/core/html/canvas/WebGLLoseContext.cpp
|
| +++ b/Source/core/html/canvas/WebGLLoseContext.cpp
|
| @@ -58,14 +58,16 @@ PassRefPtrWillBeRawPtr<WebGLLoseContext> WebGLLoseContext::create(WebGLRendering
|
|
|
| void WebGLLoseContext::loseContext()
|
| {
|
| - if (!isLost())
|
| - m_context->forceLostContext(WebGLRenderingContextBase::WebGLLoseContextLostContext, WebGLRenderingContextBase::Manual);
|
| + WebGLExtensionScopedContext scoped(this);
|
| + if (!scoped.isLost())
|
| + scoped.context()->forceLostContext(WebGLRenderingContextBase::WebGLLoseContextLostContext, WebGLRenderingContextBase::Manual);
|
| }
|
|
|
| void WebGLLoseContext::restoreContext()
|
| {
|
| - if (!isLost())
|
| - m_context->forceRestoreContext();
|
| + WebGLExtensionScopedContext scoped(this);
|
| + if (!scoped.isLost())
|
| + scoped.context()->forceRestoreContext();
|
| }
|
|
|
| bool WebGLLoseContext::supported(WebGLRenderingContextBase*)
|
|
|