Closed
Bug 1034477
Opened 11 years ago
Closed 11 years ago
SavedStacks doesn't save the full stack
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla33
People
(Reporter: bzbarsky, Assigned: fitzgen)
References
Details
Attachments
(1 file)
1.73 KB,
patch
|
shu
:
review+
|
Details | Diff | Splinter Review |
Compare what js::ComputeStackString does:
NonBuiltinFrameIter i(cx, FrameIter::ALL_CONTEXTS, FrameIter::GO_THROUGH_SAVED,
cx->compartment()->principals);
or what JS::DescribeStack does:
NonBuiltinFrameIter i(cx, FrameIter::ALL_CONTEXTS,
FrameIter::GO_THROUGH_SAVED,
cx->compartment()->principals);
with what SavedStacks does:
ScriptFrameIter iter(cx);
This causes js/xpconnect/tests/mochitest/test_bug960820.html to fail if I switch over XPConnect stack walking from JS::DescribeStack to SavedStacks, because in that case we do in fact have to cross JSContexts _and_ go through saved stacks to get the right answer, as far as I can tell.
Assignee | ||
Comment 1•11 years ago
|
||
Bug 1030945 switches to plain old FrameIter (and we still use principals to show/hide self hosted frames). After that, it seems we would just need to add the ALL_CONTEXTS and GO_THROUGH_SAVED flags, right?
Depends on: 1030945
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → nfitzgerald
Assignee | ||
Updated•11 years ago
|
Status: NEW → ASSIGNED
Reporter | ||
Comment 2•11 years ago
|
||
> After that, it seems we would just need to add the ALL_CONTEXTS and GO_THROUGH_SAVED
> flags, right?
Yes, indeed. That can even happen independently of bug 1030945, modulo merge issues.
Assignee | ||
Comment 3•11 years ago
|
||
Attachment #8453969 -
Flags: review?(shu)
Comment 4•11 years ago
|
||
Comment on attachment 8453969 [details] [diff] [review]
save-cross-context-stacks.patch
Review of attachment 8453969 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/vm/SavedStacks.cpp
@@ +398,5 @@
> SavedStacks::saveCurrentStack(JSContext *cx, MutableHandleSavedFrame frame, unsigned maxFrameCount)
> {
> JS_ASSERT(initialized());
> JS_ASSERT(&cx->compartment()->savedStacks() == this);
> + FrameIter iter(cx, FrameIter::ALL_CONTEXTS, FrameIter::GO_THROUGH_SAVED);
Just to make sure: we don't pass in principals here because that filtering is done at stringifying time.
Attachment #8453969 -
Flags: review?(shu) → review+
Comment 6•11 years ago
|
||
Flags: in-testsuite+
Keywords: checkin-needed
Comment 7•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in
before you can comment on or make changes to this bug.
Description
•