Closed Bug 1276162 Opened 8 years ago Closed 8 years ago

Make frame iterators view frames from all JSContexts

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla49
Tracking Status
firefox49 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(2 files)

Frame iterators have a ContextOption that specifies whether they should skip activations belonging to unrelated contexts. The default is CURRENT_CONTEXT.

The saved frame audit (bug 1274193, bug 1274915) converted the most interesting iterators to do principal checking + ALL_CONTEXTS, and I think most places that didn't care about seeing through saved frames also don't care about different contexts.
The first patch in bug 979730 is very useful here because the frame iterators it touches are exactly the ones we have to check.

I think all of them are fine with ALL_CONTEXTS, the only one I'm not sure about is GetScriptedCallerGlobal (and the cx skipping we do in GetScriptedCallerActivationFast). I can do a Try push to see if that uncovers anything obvious.

There's also cx->currentScript() where we skip unrelated contexts, but we can deal with that in a separate bug.
Attachment #8757316 - Flags: review?(luke)
Comment on attachment 8757315 [details] [diff] [review]
Part 1 - Stop skipping contexts in GetScriptedCallerActivationFast

r=me
Attachment #8757315 - Flags: review+
Comment on attachment 8757316 [details] [diff] [review]
Part 2 - Remove ContextOption

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

\o/

::: js/src/vm/Debugger.cpp
@@ +7013,1 @@
>                                ScriptFrameIter::IGNORE_DEBUGGER_EVAL_PREV_LINK); \

Maybe fold onto one line (since it goes past the macro \ column anyway).
Attachment #8757316 - Flags: review?(luke) → review+
https://hg.mozilla.org/mozilla-central/rev/d04a27a81ae9
https://hg.mozilla.org/mozilla-central/rev/54abdc6d524e
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: