Bug 105732 - [chromium] DrawingBuffer initialization loop breaks if completely out of memory
Summary: [chromium] DrawingBuffer initialization loop breaks if completely out of memory
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Brandon Jones
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-24 18:57 PST by Kenneth Russell
Modified: 2012-12-28 09:46 PST (History)
6 users (show)

See Also:


Attachments
Patch (2.11 KB, patch)
2012-12-27 11:54 PST, Brandon Jones
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kenneth Russell 2012-12-24 18:57:23 PST
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.
Comment 1 Brandon Jones 2012-12-27 11:54:10 PST
Created attachment 180813 [details]
Patch
Comment 2 Kenneth Russell 2012-12-28 09:21:10 PST
Comment on attachment 180813 [details]
Patch

Looks good, but how was this tested?
Comment 3 Brandon Jones 2012-12-28 09:26:29 PST
(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 4 Kenneth Russell 2012-12-28 09:40:40 PST
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 5 WebKit Review Bot 2012-12-28 09:46:32 PST
Comment on attachment 180813 [details]
Patch

Clearing flags on attachment: 180813

Committed r138542: <http://trac.webkit.org/changeset/138542>
Comment 6 WebKit Review Bot 2012-12-28 09:46:35 PST
All reviewed patches have been landed.  Closing bug.