Skip to content

Commit 190a6f5

Browse files
committed
Handle case where function caller is null
1 parent 2585967 commit 190a6f5

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

stack-generator.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222

2323
var curr = arguments.callee;
2424
while (curr && stack.length < maxStackSize) {
25+
if (!curr['arguments']) {
26+
break;
27+
}
2528
// Allow V8 optimizations
2629
var args = new Array(curr['arguments'].length);
2730
for (var i = 0; i < args.length; ++i) {

0 commit comments

Comments
 (0)