Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index e3cb08bbc47689508f96185e4729dd83531b2ab7..08260280d7520222f8f3dab5a51c940b1f33fdf4 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -420,6 +420,7 @@ const int kStubMinorKeyBits = kSmiValueSize - kStubMajorKeyBits - 1; |
V(JS_MODULE_TYPE) \ |
V(JS_GLOBAL_OBJECT_TYPE) \ |
V(JS_GLOBAL_PROXY_TYPE) \ |
+ V(JS_API_OBJECT_TYPE) \ |
V(JS_SPECIAL_API_OBJECT_TYPE) \ |
V(JS_ARRAY_TYPE) \ |
V(JS_ARRAY_BUFFER_TYPE) \ |
@@ -702,11 +703,14 @@ enum InstanceType { |
JS_PROXY_TYPE, // FIRST_JS_RECEIVER_TYPE |
JS_GLOBAL_OBJECT_TYPE, // FIRST_JS_OBJECT_TYPE |
JS_GLOBAL_PROXY_TYPE, |
- // Like JS_OBJECT_TYPE, but requires access checks and/or has interceptors. |
+ // Like JS_API_OBJECT_TYPE, but requires access checks and/or has |
+ // interceptors. |
JS_SPECIAL_API_OBJECT_TYPE, // LAST_SPECIAL_RECEIVER_TYPE |
JS_VALUE_TYPE, // LAST_CUSTOM_ELEMENTS_RECEIVER |
JS_MESSAGE_OBJECT_TYPE, |
JS_DATE_TYPE, |
+ // Like JS_OBJECT_TYPE, but created from API function. |
+ JS_API_OBJECT_TYPE, |
JS_OBJECT_TYPE, |
JS_CONTEXT_EXTENSION_OBJECT_TYPE, |
JS_GENERATOR_OBJECT_TYPE, |
@@ -762,6 +766,7 @@ enum InstanceType { |
}; |
STATIC_ASSERT(JS_OBJECT_TYPE == Internals::kJSObjectType); |
+STATIC_ASSERT(JS_API_OBJECT_TYPE == Internals::kJSApiObjectType); |
STATIC_ASSERT(FIRST_NONSTRING_TYPE == Internals::kFirstNonstringType); |
STATIC_ASSERT(ODDBALL_TYPE == Internals::kOddballType); |
STATIC_ASSERT(FOREIGN_TYPE == Internals::kForeignType); |
@@ -2284,6 +2289,7 @@ class JSObject: public JSReceiver { |
inline Object* GetInternalField(int index); |
inline void SetInternalField(int index, Object* value); |
inline void SetInternalField(int index, Smi* value); |
+ bool WasConstructedFromApiFunction(); |
void CollectOwnPropertyNames(KeyAccumulator* keys, |
PropertyFilter filter = ALL_PROPERTIES); |