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

[compiler] Mark JSFunctionRef::context immutable

The JSFunction::set_context call happens 1. only on script functions
and 2. before the function is executed, and therefore the compiler
only ever sees the final value.

Bug: v8:7790
Change-Id: I618673c7ec6284dcf3d80b1edd7be516b048ed2c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3041664
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75833}
parent 72600c8a
......@@ -1163,11 +1163,7 @@ bool JSFunctionData::IsConsistentWithHeapState(JSHeapBroker* broker) const {
Handle<JSFunction> f = Handle<JSFunction>::cast(object());
if (*context_->object() != f->context()) {
TRACE_BROKER_MISSING(broker, "JSFunction::context");
return false;
}
CHECK_EQ(*context_->object(), f->context());
CHECK_EQ(*native_context_->object(), f->native_context());
CHECK_EQ(*shared_->object(), f->shared());
......
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