| Index: src/preparser.cc
|
| diff --git a/src/preparser.cc b/src/preparser.cc
|
| index e7fff33d3bf7f6d47b96a9debbe5ac7a52c0957f..4111de283fd898a654de31067d37968a66f64215 100644
|
| --- a/src/preparser.cc
|
| +++ b/src/preparser.cc
|
| @@ -194,8 +194,19 @@ void PreParser::ParseStatementList(int end_token, bool* ok) {
|
| if (directive_prologue && peek() != Token::STRING) {
|
| directive_prologue = false;
|
| }
|
| + Token::Value token = peek();
|
| + Scanner::Location old_super_loc = function_state_->super_call_location();
|
| Statement statement = ParseStatementListItem(ok);
|
| if (!*ok) return;
|
| + Scanner::Location super_loc = function_state_->super_call_location();
|
| + if (is_strong(language_mode()) &&
|
| + i::IsConstructor(function_state_->kind()) &&
|
| + !old_super_loc.IsValid() && super_loc.IsValid() &&
|
| + token != Token::SUPER) {
|
| + ReportMessageAt(super_loc, "strong_super_call_nested");
|
| + *ok = false;
|
| + return;
|
| + }
|
| if (directive_prologue) {
|
| if (statement.IsUseStrictLiteral()) {
|
| scope_->SetLanguageMode(
|
| @@ -945,6 +956,14 @@ PreParser::Expression PreParser::ParseFunctionLiteral(
|
| CheckStrictOctalLiteral(start_position, end_position, CHECK_OK);
|
| }
|
|
|
| + if (is_strong(language_mode()) && IsSubclassConstructor(kind)) {
|
| + if (!function_state.super_call_location().IsValid()) {
|
| + ReportMessageAt(function_name_location, "strong_super_call_missing");
|
| + *ok = false;
|
| + return Expression::Default();
|
| + }
|
| + }
|
| +
|
| return Expression::Default();
|
| }
|
|
|
|
|