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

Unified Diff: src/preparser.h

Issue 1467473002: Install ConstructNonConstructable as construct stub for non-constructables. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 5 years, 1 month 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 | « src/objects.cc ('k') | src/prettyprinter.cc » ('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 8aab9198a490bf5265c59fd342d18234f8a8e26f..1de6678c1e15ca8c627db9bc0612f1b9c1a32210 100644
--- a/src/preparser.h
+++ b/src/preparser.h
@@ -3337,7 +3337,8 @@ ParserBase<Traits>::ParseLeftHandSideExpression(
return this->EmptyExpression();
}
int pos;
- if (scanner()->current_token() == Token::IDENTIFIER) {
+ if (scanner()->current_token() == Token::IDENTIFIER ||
+ scanner()->current_token() == Token::SUPER) {
// For call of an identifier we want to report position of
// the identifier as position of the call in the stack trace.
pos = position();
@@ -3677,8 +3678,8 @@ typename ParserBase<Traits>::ExpressionT
ParserBase<Traits>::ParseSuperExpression(bool is_new,
ExpressionClassifier* classifier,
bool* ok) {
- int pos = position();
Expect(Token::SUPER, CHECK_OK);
+ int pos = position();
Scope* scope = scope_->ReceiverScope();
FunctionKind kind = scope->function_kind();
« no previous file with comments | « src/objects.cc ('k') | src/prettyprinter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698