Commit 48c5d677 authored by Santiago Aboy Solanes's avatar Santiago Aboy Solanes Committed by V8 LUCI CQ

[compiler] Add Ref name to the "Ref creation failure" error message

When failing to construct a Ref, it helps debugging knowing which class
is the one we failed to create.

Bug: v8:7790
Change-Id: I22388920633fe2155c7b4fa712c5dead25a2f2d6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2992726Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75460}
parent 9ca10d84
......@@ -2914,14 +2914,14 @@ ObjectData* JSHeapBroker::TryGetOrCreateData(Handle<Object> object,
kUnserializedReadOnlyHeapObject);
}
#define CREATE_DATA(Name, Kind) \
if (object->Is##Name()) { \
CreateDataFunctor<Kind, Name##Data, Name> f; \
if (!f(this, refs_, object, &entry, &object_data)) { \
CHECK_WITH_MSG(!crash_on_error, "Ref construction failed"); \
return nullptr; \
} \
/* NOLINTNEXTLINE(readability/braces) */ \
#define CREATE_DATA(Name, Kind) \
if (object->Is##Name()) { \
CreateDataFunctor<Kind, Name##Data, Name> f; \
if (!f(this, refs_, object, &entry, &object_data)) { \
CHECK_WITH_MSG(!crash_on_error, #Name "Ref construction failed"); \
return nullptr; \
} \
/* NOLINTNEXTLINE(readability/braces) */ \
} else
HEAP_BROKER_OBJECT_LIST(CREATE_DATA)
#undef CREATE_DATA
......
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