REGRESSION (r199819): CrashTracer: [GraphicsContext3D::getInternalFramebufferSize
https://bugs.webkit.org/show_bug.cgi?id=158895
<rdar://problem/26423617>
Reviewed by Zalan Bujtas.
Source/WebCore:
In r199819 we started resetting contexts if the page had too
many. Unfortunately there were entry points in the WebGL context
that didn't check for the validity of the object before trying
to access the lower level objects.
Test: webgl/many-contexts-access-after-loss.html
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::drawingBufferWidth): Return 0 if we're lost.
(WebCore::WebGLRenderingContextBase::drawingBufferHeight): Ditto.
LayoutTests:
New test to access the contexts after loss. Also cleaned
up the JavaScript code in the existing test (and made sure
it ran outside of the test system).
* webgl/many-contexts-access-after-loss-expected.txt: Added.
* webgl/many-contexts-access-after-loss.html: Added.
* webgl/many-contexts.html:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@202192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
6 files changed