Closed Bug 1184238 Opened 7 years ago Closed 7 years ago

SavedStacks stack capturing should use emplaceBack

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: fitzgen, Assigned: fitzgen)

References

Details

Attachments

(1 file)

Instead of growByUninitialized(1) and a placement new.
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
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.