Closed Bug 1353618 Opened 3 years ago Closed 3 years ago
Optimize storage of Moz
Promise::m Then Values
http://searchfox.org/mozilla-central/rev/381a7b8f8a78b481336cfa384cb0a5536e217e4a/xpcom/threads/MozPromise.h#929 There should be at most only one element in the array when IsExclusive is true. We can use AutoTArray<RefPtr<ThenValueBase>,1> for more efficient storage and avoid indirect heap allocation incurred by nsTArray<>.
Attachment #8854726 - Flags: review?(gsquelart)
3 years ago
Assignee: nobody → jwwang
Comment on attachment 8854726 [details] Bug 1353618 - Optimize storage of MozPromise::mThenValues. https://reviewboard.mozilla.org/r/126684/#review129310
Attachment #8854726 - Flags: review?(gsquelart) → review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/07c96da52366 Optimize storage of MozPromise::mThenValues. r=gerald
Comment on attachment 8854726 [details] Bug 1353618 - Optimize storage of MozPromise::mThenValues. Approval Request Comment [Feature/Bug causing the regression]:none [User impact if declined]:This patch changes the memory allocation pattern for MozPromise which might provide more clues when debugging memory corruption in MozPromise. [Is this code covered by automated tests?]:yes [Has the fix been verified in Nightly?]:yes [Needs manual test from QE? If yes, steps to reproduce]: no [List of other uplifts needed for the feature/fix]:none [Is the change risky?]:no [Why is the change risky/not risky?]:this is a simple one-line change. [String changes made/needed]:none
Comment on attachment 8854726 [details] Bug 1353618 - Optimize storage of MozPromise::mThenValues. This is for debugging purpose. I don't think we need this in Beta53 given next week is RC week but we can take it in aurora. Aurora54+.
You need to log in before you can comment on or make changes to this bug.