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

Unified Diff: src/ast/ast.cc

Issue 2368253002: VariableProxy: when cloning, don't even think about creating dangling references. (Closed)
Patch Set: Created 4 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/ast.cc
diff --git a/src/ast/ast.cc b/src/ast/ast.cc
index c4808ca840500bd89c9c4b1498d2f5f16733ad2e..4ecdcf1bb44b81e3ab6a6179de0323466e5842a3 100644
--- a/src/ast/ast.cc
+++ b/src/ast/ast.cc
@@ -186,11 +186,8 @@ VariableProxy::VariableProxy(const VariableProxy* copy_from)
end_position_(copy_from->end_position_),
next_unresolved_(nullptr) {
bit_field_ = copy_from->bit_field_;
- if (copy_from->is_resolved()) {
- var_ = copy_from->var_;
- } else {
- raw_name_ = copy_from->raw_name_;
- }
+ DCHECK(!copy_from->is_resolved());
+ raw_name_ = copy_from->raw_name_;
}
void VariableProxy::BindTo(Variable* var) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698