Index: Source/core/html/HTMLCanvasElement.cpp |
diff --git a/Source/core/html/HTMLCanvasElement.cpp b/Source/core/html/HTMLCanvasElement.cpp |
index 88f05be55e4d05be983401dbf35925bde4185a00..466788272dc19f3fde9044ed0db6c295d71232ac 100644 |
--- a/Source/core/html/HTMLCanvasElement.cpp |
+++ b/Source/core/html/HTMLCanvasElement.cpp |
@@ -97,7 +97,9 @@ HTMLCanvasElement::~HTMLCanvasElement() |
(*it)->canvasDestroyed(this); |
#if !ENABLE(OILPAN) |
- m_context.clear(); // Ensure this goes away before the ImageBuffer. |
+ // Ensure these go away before the ImageBuffer. |
+ m_contextStateSaver.clear(); |
+ m_context.clear(); |
#endif |
} |
@@ -514,6 +516,9 @@ void HTMLCanvasElement::createImageBufferInternal() |
// See CanvasRenderingContext2D::State::State() for more information. |
m_imageBuffer->context()->setMiterLimit(10); |
m_imageBuffer->context()->setStrokeThickness(1); |
+#if !ASSERT_DISABLED |
+ m_imageBuffer->context()->disableDestructionChecks(); // 2D canvas is allowed to leave context in an unfinalized state. |
f(malita)
2014/05/27 20:28:22
If we have exclusive control of the initialization
Justin Novosad
2014/05/27 22:25:25
Right no ImageBuffer is not explicitly aware that
|
+#endif |
m_contextStateSaver = adoptPtr(new GraphicsContextStateSaver(*m_imageBuffer->context())); |
if (m_context) |