Commit 8edf2905 authored by hablich's avatar hablich Committed by Commit bot

Revert of VariableProxy: when cloning, don't even think about creating...

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}
parent 9618d095
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment