mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 22:05:44 +00:00
Bug 1285465 - Do not throw when callStack is empty. r=jwalden
This commit is contained in:
parent
83a68d4157
commit
6a2df0c986
@ -211,8 +211,8 @@
|
||||
|
||||
/** Peeks at the top of the call stack. */
|
||||
function currentFunc() {
|
||||
assertEq(callStack.length > 0, true,
|
||||
"must be a current function to examine");
|
||||
if (callStack.length == 0)
|
||||
return "top level script";
|
||||
|
||||
return callStack[callStack.length - 1];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user