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

Unified Diff: src/ast/scopes.h

Issue 2224793003: Only conditionally add inner scope when deserializing (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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 | src/ast/scopes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/scopes.h
diff --git a/src/ast/scopes.h b/src/ast/scopes.h
index 80cbe63cbed7b1701509793a2aac742bbd09846b..53c9806aeb669ba64ef51f52329d154a87344a5d 100644
--- a/src/ast/scopes.h
+++ b/src/ast/scopes.h
@@ -622,11 +622,9 @@ class Scope: public ZoneObject {
const AstRawString* catch_variable_name);
void AddInnerScope(Scope* inner_scope) {
- if (inner_scope != nullptr) {
- inner_scope->sibling_ = inner_scope_;
- inner_scope_ = inner_scope;
- inner_scope->outer_scope_ = this;
- }
+ inner_scope->sibling_ = inner_scope_;
+ inner_scope_ = inner_scope;
+ inner_scope->outer_scope_ = this;
}
void RemoveInnerScope(Scope* inner_scope) {
« no previous file with comments | « no previous file | src/ast/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698