mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 960108 - Ignore saved frame chains and contexts in JS::DescribeStack. r=bz
This commit is contained in:
parent
f5e48ed89d
commit
0f2729e9aa
@ -939,7 +939,10 @@ JS::DescribeStack(JSContext *cx, unsigned maxFrames)
|
||||
{
|
||||
Vector<FrameDescription> frames(cx);
|
||||
|
||||
for (NonBuiltinScriptFrameIter i(cx); !i.done(); ++i) {
|
||||
NonBuiltinScriptFrameIter i(cx, ScriptFrameIter::ALL_CONTEXTS,
|
||||
ScriptFrameIter::GO_THROUGH_SAVED,
|
||||
cx->compartment()->principals);
|
||||
for ( ; !i.done(); ++i) {
|
||||
if (!frames.append(i))
|
||||
return nullptr;
|
||||
if (frames.length() == maxFrames)
|
||||
|
@ -26,6 +26,15 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=960820
|
||||
ok(/clickCallback/.test(stack), "clickCallback should be in the stack");
|
||||
ok(!/clickHandler/.test(stack), "clickHandler should not be in the stack");
|
||||
ok(/dispatchClick/.test(stack), "dispatchClick should be in the stack");
|
||||
|
||||
// Check Components.stack, but first filter through the SpecialPowers junk.
|
||||
var stack = SpecialPowers.wrap(SpecialPowers.Components).stack;
|
||||
while (/specialpowers/.test(stack)) {
|
||||
stack = stack.caller;
|
||||
}
|
||||
ok(/clickCallback/.test(stack), "clickCallback should be reachable via Components.stack");
|
||||
ok(/clickHandler/.test(stack.caller), "clickHandler should be reachable via Components.stack");
|
||||
ok(/dispatchClick/.test(stack.caller.caller), "dispatchClick hould be reachable via Components.stack");
|
||||
}
|
||||
function dispatchClick() {
|
||||
document.dispatchEvent(new MouseEvent('click'));
|
||||
|
Loading…
Reference in New Issue
Block a user