Revert of VariableProxy: when cloning, don't even think about creating dangling references. (patchset #1 id:1 of https://codereview.chromium.org/2368253002/ )
Reason for revert: Needed for https://codereview.chromium.org/2373443003/ Original issue's description: > VariableProxy: when cloning, don't even think about creating dangling references. > > The code path for cloning resolved VariableProxys (into a different > Zone) was never hit, but if it was, it would create a dangling > reference, since the Variable would stay in the original Zone. > > Kudos to verwaest@ for finding this! > > R=verwaest@chromium.org > BUG= > > Committed: https://crrev.com/fd429bdb9e70cb8c4f8a4bbef0806e008c60440c > Cr-Commit-Position: refs/heads/master@{#39723} TBR=verwaest@chromium.org,marja@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= Review-Url: https://codereview.chromium.org/2368303002 Cr-Commit-Position: refs/heads/master@{#39726}
This commit is contained in:
parent
9618d09590
commit
8edf290569
@ -186,8 +186,11 @@ VariableProxy::VariableProxy(const VariableProxy* copy_from)
|
||||
end_position_(copy_from->end_position_),
|
||||
next_unresolved_(nullptr) {
|
||||
bit_field_ = copy_from->bit_field_;
|
||||
DCHECK(!copy_from->is_resolved());
|
||||
raw_name_ = copy_from->raw_name_;
|
||||
if (copy_from->is_resolved()) {
|
||||
var_ = copy_from->var_;
|
||||
} else {
|
||||
raw_name_ = copy_from->raw_name_;
|
||||
}
|
||||
}
|
||||
|
||||
void VariableProxy::BindTo(Variable* var) {
|
||||
|
Loading…
Reference in New Issue
Block a user