Closed Bug 809533 Opened 12 years ago Closed 12 years ago

make nsPresArena and display list arena use infallible allocation

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla19
Tracking Status
firefox18 --- fixed

People

(Reporter: dbaron, Assigned: dbaron)

References

(Blocks 1 open bug)

Details

Attachments

(5 files)

We should make nsPresArena and the display list arena be infallible allocators; they allocate memory in small pieces and many of the existing callers don't handle out-of-memory.  So they should just abort on allocation failure.
Attachment #679252 - Flags: review?(roc) → review?(bzbarsky)
Comment on attachment 679251 [details] [diff] [review]
, patch 3:  Stop handling allocation failures in the style system that no longer need to be handled.

r=me.  Nice to see all that code go away!
Attachment #679251 - Flags: review?(bzbarsky) → review+
Comment on attachment 679252 [details] [diff] [review]
, patch 4:  Remove null-checks of NS_New*Frame callers in the frame constructor.

>+      // XXXldb Can we remove this now?

Yes.

r=me, but I bet there are lots of methods returning nsresult that can stop doing that now... Maybe file a followup to clean that up?
Attachment #679252 - Flags: review?(bzbarsky) → review+
Comment on attachment 679249 [details] [diff] [review]
, patch 1:  Make allocation in the frame arena and the display list arena infallible.

[Approval Request Comment]
Bug caused by (feature/regressing bug #): N/A
User impact if declined: Unable to land significant B2G performance improvement in bug 572200 without potentially risky logic changes.
Testing completed (on m-c, etc.): on mozilla-central
Risk to taking this patch (and alternatives if risky): The risk should be low; it's just applying the concept of infallible memory allocations which we already use extensively to one new class of small memory allocations.
String or UUID changes made by this patch: None.
Attachment #679249 - Flags: approval-mozilla-aurora?
Comment on attachment 679249 [details] [diff] [review]
, patch 1:  Make allocation in the frame arena and the display list arena infallible.

Approving on aurora as I understand it helps with b2g performance
Attachment #679249 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Depends on: 820220
No longer depends on: 820220
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: