| Index: src/heap/heap.cc
|
| diff --git a/src/heap/heap.cc b/src/heap/heap.cc
|
| index 1105c6868dc4699e0c0ffb9c057d7a6c16775112..0bb12f6b6af42d0f68ff8f9a88a84c8a7d86498d 100644
|
| --- a/src/heap/heap.cc
|
| +++ b/src/heap/heap.cc
|
| @@ -1493,12 +1493,13 @@ static bool IsUnscavengedHeapObject(Heap* heap, Object** p) {
|
|
|
| static bool IsUnmodifiedHeapObject(Object** p) {
|
| Object* object = *p;
|
| - DCHECK(object->IsHeapObject());
|
| + if (object->IsSmi()) return false;
|
| HeapObject* heap_object = HeapObject::cast(object);
|
| if (!object->IsJSObject()) return false;
|
| Object* obj_constructor = (JSObject::cast(object))->map()->GetConstructor();
|
| if (!obj_constructor->IsJSFunction()) return false;
|
| JSFunction* constructor = JSFunction::cast(obj_constructor);
|
| + if (!constructor->shared()->IsApiFunction()) return false;
|
| if (constructor != nullptr &&
|
| constructor->initial_map() == heap_object->map()) {
|
| return true;
|
|
|