Commit 43503288 authored by hablich's avatar hablich Committed by Commit bot

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

Reland of VariableProxy: when cloning, don't even think about creating dangling references. (patchset #1 id:1 of https://codereview.chromium.org/2368303002/ )

Reason for revert:
wrong CL

Original issue's description:
> 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=
>
> Committed: https://crrev.com/8edf2905693a2b486a97a0547ec53bb552f7db15
> Cr-Commit-Position: refs/heads/master@{#39726}

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/2366373002
Cr-Commit-Position: refs/heads/master@{#39728}
parent 5925793d
......@@ -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) {
......
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