Last Comment Bug 685404 - nsAutoTArray-ize callers to nsDisplayList::HitTest
: nsAutoTArray-ize callers to nsDisplayList::HitTest
Status: RESOLVED FIXED
[MemShrink]
:
Product: Core
Classification: Components
Component: Layout (show other bugs)
: Trunk
: x86_64 Windows 7
: -- normal (vote)
: mozilla9
Assigned To: Robert O'Callahan (:roc) (email my personal email if necessary)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-07 21:21 PDT by Robert O'Callahan (:roc) (email my personal email if necessary)
Modified: 2011-09-09 07:41 PDT (History)
6 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
fix (2.24 KB, patch)
2011-09-07 21:23 PDT, Robert O'Callahan (:roc) (email my personal email if necessary)
tnikkel: review+
Details | Diff | Splinter Review

Description Robert O'Callahan (:roc) (email my personal email if necessary) 2011-09-07 21:21:58 PDT

    
Comment 1 Robert O'Callahan (:roc) (email my personal email if necessary) 2011-09-07 21:23:27 PDT
Created attachment 559040 [details] [diff] [review]
fix
Comment 2 Timothy Nikkel (:tnikkel) 2011-09-07 21:56:14 PDT
Comment on attachment 559040 [details] [diff] [review]
fix

So the idea is to allocate a reasonable amount of space at the start instead of allocating later in smaller pieces?
Comment 3 Robert O'Callahan (:roc) (email my personal email if necessary) 2011-09-07 22:00:53 PDT
The idea is to have an 8-element array on the stack so we don't have to heap-allocate at all.
Comment 4 Robert O'Callahan (:roc) (email my personal email if necessary) 2011-09-07 22:01:15 PDT
(which is slower and could cause fragmentation)
Comment 5 Boris Zbarsky [:bz] (TPAC) 2011-09-08 07:07:01 PDT
Could we enforce this by making the callee signatures explicitly list an nsTArray, just in case another caller gets added?  And if so, do we want to?
Comment 7 Robert O'Callahan (:roc) (email my personal email if necessary) 2011-09-08 22:34:21 PDT
We could enforce it, but it's probably not worth it.

Note You need to log in before you can comment on or make changes to this bug.