Skip to content

Commit

Permalink
[js] For now you limite stack traces in firefox instead of exploding
Browse files Browse the repository at this point in the history
  • Loading branch information
pmurias committed Nov 27, 2018
1 parent 382984e commit 74787d9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/vm/js/nqp-runtime/ctx.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,12 @@ class Ctx extends NQPObject {
}

throw(exception) {
exception.$$stack = stackTrace.get();
// Partial workaround for browser that don't use the V8 stack trace API (like Firefox)
try {
exception.$$stack = stackTrace.get();
} catch (e) {
exception.$$stack = [];
}
exception.$$ctx = this;
return this.propagateException(exception);
}
Expand Down

0 comments on commit 74787d9

Please sign in to comment.