summaryrefslogtreecommitdiff
path: root/deps/v8/src/preparser.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/preparser.cc')
-rw-r--r--deps/v8/src/preparser.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/deps/v8/src/preparser.cc b/deps/v8/src/preparser.cc
index 20d3b9c59c..0c17eecd6a 100644
--- a/deps/v8/src/preparser.cc
+++ b/deps/v8/src/preparser.cc
@@ -581,9 +581,8 @@ PreParser::Statement PreParser::ParseWithStatement(bool* ok) {
ParseExpression(true, CHECK_OK);
Expect(i::Token::RPAREN, CHECK_OK);
- scope_->EnterWith();
+ Scope::InsideWith iw(scope_);
ParseStatement(CHECK_OK);
- scope_->LeaveWith();
return Statement::Default();
}
@@ -749,10 +748,9 @@ PreParser::Statement PreParser::ParseTryStatement(bool* ok) {
return Statement::Default();
}
Expect(i::Token::RPAREN, CHECK_OK);
- scope_->EnterWith();
- ParseBlock(ok);
- scope_->LeaveWith();
- if (!*ok) Statement::Default();
+ { Scope::InsideWith iw(scope_);
+ ParseBlock(CHECK_OK);
+ }
catch_or_finally_seen = true;
}
if (peek() == i::Token::FINALLY) {