+2011-11-15 Jeff Timanus <twiz@chromium.org>
+
+ [chromium] During tear down, prevent the WebGLLayerChromium instance from attempting to stop a timer for a NULL context.
+ https://bugs.webkit.org/show_bug.cgi?id=72423
+
+ Reviewed by Kenneth Russell.
+
+ * platform/graphics/chromium/WebGLLayerChromium.cpp:
+ (WebCore::WebGLLayerChromium::setDrawingBuffer):
+
2011-11-15 Mark Hahnenberg <mhahnenberg@apple.com>
Rebaseline generated WebCore bindings
: CanvasLayerChromium(delegate)
, m_textureChanged(true)
, m_textureUpdated(false)
+ , m_drawingBuffer(0)
{
}
void WebGLLayerChromium::setDrawingBuffer(DrawingBuffer* drawingBuffer)
{
bool drawingBufferChanged = (m_drawingBuffer != drawingBuffer);
- m_drawingBuffer = drawingBuffer;
- if (layerTreeHost() && drawingBufferChanged)
- layerTreeHost()->stopRateLimiter(context());
+ // The GraphicsContext3D used by the layer is the context associated with
+ // the drawing buffer. If the drawing buffer is changing, make sure
+ // to stop the rate limiter on the old context, not the new context from the
+ // new drawing buffer.
+ GraphicsContext3D* context3D = context();
+ if (layerTreeHost() && drawingBufferChanged && context3D)
+ layerTreeHost()->stopRateLimiter(context3D);
+ m_drawingBuffer = drawingBuffer;
if (!m_drawingBuffer)
return;