| Index: src/objects.cc
|
| diff --git a/src/objects.cc b/src/objects.cc
|
| index a6b3edef56f8953d69dbf16602ad6a03bedee366..51a43d770fb31b5376570c96442ae1b8a73394cc 100644
|
| --- a/src/objects.cc
|
| +++ b/src/objects.cc
|
| @@ -16464,6 +16464,12 @@ void JSObject::CollectOwnPropertyNames(KeyAccumulator* keys,
|
| }
|
| }
|
|
|
| +bool JSObject::WasConstructedFromApiFunction() {
|
| + Object* maybe_constructor = map()->GetConstructor();
|
| + if (!maybe_constructor->IsJSFunction()) return false;
|
| + JSFunction* constructor = JSFunction::cast(maybe_constructor);
|
| + return constructor->shared()->IsApiFunction();
|
| +}
|
|
|
| int JSObject::NumberOfOwnElements(PropertyFilter filter) {
|
| // Fast case for objects with no elements.
|
|
|