Brandon Jones discovered while debugging Issue 104733 and Issue 105367 that if s_currentResourceUsePixels is at the maximum, DrawingBuffer initialization will silently fail, and the WebGL context will silently display nothing. This behavior needs to be improved. At a minimum, context creation should probably report failure.
Created attachment 180813 [details] Patch
Comment on attachment 180813 [details] Patch Looks good, but how was this tested?
(In reply to comment #2) > (From update of attachment 180813 [details]) > Looks good, but how was this tested? Using a modification of the test page for Bug 105367. I'm working on a more straightforward test, but I wanted to make sure this patch was available before I took my parental leave. The biggest issue with creating a robust test is that javascript can't query s_maximumResourceUsePixels, so any test script we make will have to assume that the limit is 16Mb, etc. If we change that behavior at all (make the maximum a percentage of total VRAM, for example) then the test will fail.
Comment on attachment 180813 [details] Patch OK. Thanks for making this more robust. Let's continue to work on tests -- perhaps using window.internals or similar to do failure injection. r=me (I assume you wanted this committed.)
Comment on attachment 180813 [details] Patch Clearing flags on attachment: 180813 Committed r138542: <http://trac.webkit.org/changeset/138542>
All reviewed patches have been landed. Closing bug.