Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Unified Diff: src/preparser.h

Issue 916293004: Fix location of super syntax errors (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/message/super-in-function.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.h
diff --git a/src/preparser.h b/src/preparser.h
index a60b218a37ba1dab589294890e288f8ff1ed6e86..141761d9c967e92ba5389824a55ae11a902dfd5c 100644
--- a/src/preparser.h
+++ b/src/preparser.h
@@ -2736,7 +2736,6 @@ ParserBase<Traits>::ParseMemberExpression(bool* ok) {
template <class Traits>
typename ParserBase<Traits>::ExpressionT
ParserBase<Traits>::ParseSuperExpression(bool is_new, bool* ok) {
- int beg_pos = position();
Expect(Token::SUPER, CHECK_OK);
FunctionState* function_state = function_state_;
@@ -2760,7 +2759,7 @@ ParserBase<Traits>::ParseSuperExpression(bool is_new, bool* ok) {
}
}
- ReportMessageAt(Scanner::Location(beg_pos, position()), "unexpected_super");
+ ReportMessageAt(scanner()->location(), "unexpected_super");
*ok = false;
return this->EmptyExpression();
}
« no previous file with comments | « no previous file | test/message/super-in-function.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698