Commit 22bacf9a authored by Georg Neis's avatar Georg Neis Committed by V8 LUCI CQ

[compiler] Fix MapRef::prototype()

It was using MakeRef but it's not guaranteed that we can create a Ref
for the prototype if we haven't seen it during serialization. Use
TryMakeRef instead.

Tbr: jgruber@chromium.org
Bug: chromium:1206670, v8:7790
Change-Id: Ifc00cb1dbf7747c766011f5915bb15fe093b920c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2878749Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74442}
parent 22f124ce
......@@ -3570,7 +3570,9 @@ DescriptorArrayRef MapRef::instance_descriptors() const {
}
base::Optional<HeapObjectRef> MapRef::prototype() const {
IF_ACCESS_FROM_HEAP_WITH_FLAG(HeapObject, prototype);
if (data_->should_access_heap() || broker()->is_concurrent_inlining()) {
return TryMakeRef(broker(), HeapObject::cast(object()->prototype()));
}
ObjectData* prototype_data = data()->AsMap()->prototype();
if (prototype_data == nullptr) {
TRACE_BROKER_MISSING(broker(), "prototype for map " << *this);
......
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