Skip to content

Commit 74787d9

Browse files
committed
[js] For now you limite stack traces in firefox instead of exploding
1 parent 382984e commit 74787d9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/vm/js/nqp-runtime/ctx.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,12 @@ class Ctx extends NQPObject {
233233
}
234234

235235
throw(exception) {
236-
exception.$$stack = stackTrace.get();
236+
// Partial workaround for browser that don't use the V8 stack trace API (like Firefox)
237+
try {
238+
exception.$$stack = stackTrace.get();
239+
} catch (e) {
240+
exception.$$stack = [];
241+
}
237242
exception.$$ctx = this;
238243
return this.propagateException(exception);
239244
}

0 commit comments

Comments
 (0)