Open Bug 1116954 Opened 10 years ago Updated 2 years ago

nsAutoTArray equivalence for unmovable objects

Categories

(Core :: XPCOM, defect)

defect

Tracking

()

People

(Reporter: xidorn, Unassigned)

Details

Sometimes we need to store unmovale objects, such as nsLineLayout and nsHTMLReflowState, in an in-stack array. It could have better performance if they can be stored in something like nsAutoTArray. However, nsTArray always requires its elements to be movable. My current approach is using nsAutoTArray<UniquePtr<Unmovable>, N>, but it is obvious that this approach does not allocate the Unmovable objects themselves in stack at all. I hope there could be some useful classes for this.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.