Commit a1427aad authored by Patrick Thier's avatar Patrick Thier Committed by V8 LUCI CQ

Assert that we never copy properties from an object itself

When copying properties, it should never happen that source == target.
Add a CHECK to assert this assumption.

Bug: chromium:1260129
Change-Id: Ia5248e4363d85e13052db726fb7143897cea9c87
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3226779
Commit-Queue: Patrick Thier <pthier@chromium.org>
Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77418}
parent 14dc3572
......@@ -230,6 +230,9 @@ V8_WARN_UNUSED_RESULT Maybe<bool> FastAssign(
return Just(false);
}
// We should never try to copy properties from an object itself.
CHECK_IMPLIES(!use_set, !target.is_identical_to(from));
Handle<DescriptorArray> descriptors(map->instance_descriptors(isolate),
isolate);
......
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