Commit c8dd61cb authored by Jakob Gruber's avatar Jakob Gruber Committed by V8 LUCI CQ

[compiler] Fix ref construction failure in ContextRef::previous

The `previous` field is immutable after initialization and the
context itself is read through an atomic load.

Bug: v8:7790
Change-Id: I8525cac7264573a7e9fc479613aaf268b72ab836
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3067333
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76054}
parent 3d135785
......@@ -1676,7 +1676,9 @@ ContextRef ContextRef::previous(size_t* depth) const {
current = Context::cast(current.unchecked_previous());
(*depth)--;
}
return MakeRef(broker(), current);
// The `previous` field is immutable after initialization and the
// context itself is read through an atomic load.
return MakeRefAssumeMemoryFence(broker(), current);
}
base::Optional<ObjectRef> ContextRef::get(int index) const {
......
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