Skip to content

Commit

Permalink
Simple workaround for a v8 crash.
Browse files Browse the repository at this point in the history
The crash occurs sometimes when parsing certain JS files. This works around
the crash by causing the `next()` function to be deoptimized.
  • Loading branch information
dangoor committed Jul 22, 2013
1 parent a84e21e commit 6bbdf42
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions acorn.js
Original file line number Diff line number Diff line change
Expand Up @@ -937,6 +937,7 @@
// Continue to the next token.

function next() {
eval(true);
lastStart = tokStart;
lastEnd = tokEnd;
lastEndLoc = tokEndLoc;
Expand Down

0 comments on commit 6bbdf42

Please sign in to comment.