Commit 870d3f66 authored by Toon Verwaest's avatar Toon Verwaest Committed by Commit Bot

[heap] API objects with elements aren't unmodified

Bug: v8:6284

Change-Id: I3a52819f4e67a143a0b3b63358fc4dd0df384553
Reviewed-on: https://chromium-review.googlesource.com/483482
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Reviewed-by: 's avatarJochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44766}
parent 0dfb0e21
......@@ -2969,6 +2969,7 @@ bool Heap::IsUnmodifiedHeapObject(Object** p) {
Object* maybe_constructor = js_object->map()->GetConstructor();
if (!maybe_constructor->IsJSFunction()) return false;
JSFunction* constructor = JSFunction::cast(maybe_constructor);
if (js_object->elements()->length() != 0) return false;
return constructor->initial_map() == heap_object->map();
}
......
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