Closed Bug 970042 Opened 6 years ago Closed 6 years ago

Use fallible allocation in the Windows widget code

Categories

(Core :: Widget: Win32, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla30

People

(Reporter: ehsan, Assigned: ehsan)

References

Details

Attachments

(1 file, 1 obsolete file)

No description provided.
Assignee: nobody → ehsan
Blocks: 969864
Attachment #8373010 - Flags: review?(roc)
Comment on attachment 8373010 [details] [diff] [review]
Use fallible allocation in the Windows widget code

Review of attachment 8373010 [details] [diff] [review]:
-----------------------------------------------------------------

Why are we doing this? Do you have some reason to believe these are under Web content control?
Attachment #8373010 - Flags: review?(roc) → review-
These arrays are used to compute the regions that we want to paint, which is presumably semi-controllable from content based on the invalidations that it causes.  But as I was typing this I realized that the size of the screen is obviously not controlled by content so there is an upper bound on the number of regions the content can invalidate, and I can't convince myself properly that content can create enough invalidations to cause an OOM here (unless we're already close to OOMing anyways.)  So I guess a new patch is in order.
Attachment #8373010 - Attachment is obsolete: true
Attachment #8373069 - Flags: review?(roc)
Comment on attachment 8373069 [details] [diff] [review]
Stop checking the result of nsTArray::SetLength in the Windows widget code; r=roc

Review of attachment 8373069 [details] [diff] [review]:
-----------------------------------------------------------------

We do region simplification for performance reasons which should prevent content from making these regions arbitrarily memory-hungry.
Attachment #8373069 - Flags: review?(roc) → review+
https://hg.mozilla.org/mozilla-central/rev/1827e672f179
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in before you can comment on or make changes to this bug.