SavedStacks stack capturing should use emplaceBack

RESOLVED FIXED in Firefox 42

Status

()

RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: fitzgen, Assigned: fitzgen)

Tracking

unspecified
mozilla42
Points:
---

Firefox Tracking Flags

(firefox42 fixed)

Details

Attachments

(1 attachment)

Instead of growByUninitialized(1) and a placement new.
Created attachment 8634346 [details] [diff] [review]
Use emplaceBack instead of growByUninitialized(1) and placement-new in js::SavedStacks
Attachment #8634346 - Flags: review?(shu)

Comment 2

3 years ago
Comment on attachment 8634346 [details] [diff] [review]
Use emplaceBack instead of growByUninitialized(1) and placement-new in js::SavedStacks

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

LGTM.

::: js/src/vm/SavedStacks.cpp
@@ +933,5 @@
>              if (!cx->compartment()->savedStacks().getLocation(cx, iter, &location))
>                  return false;
>          }
>  
> +        auto* displayAtom = iter.isNonEvalFunctionFrame() ? iter.functionDisplayAtom() : nullptr;

Any reason to have auto* over auto?
Attachment #8634346 - Flags: review?(shu) → review+
https://hg.mozilla.org/mozilla-central/rev/5eb67d10b3c0
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox42: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.