Index: src/api-natives.cc |
diff --git a/src/api-natives.cc b/src/api-natives.cc |
index d2cacbdaf8de16a881cf5cee8dc2c789b3eff8c0..adf4b6af576431d8d2d7c078a3fcbaffcaca8c1b 100644 |
--- a/src/api-natives.cc |
+++ b/src/api-natives.cc |
@@ -542,7 +542,13 @@ Handle<JSFunction> ApiNatives::CreateApiFunction( |
InstanceType type; |
switch (instance_type) { |
case JavaScriptObjectType: |
- type = JS_OBJECT_TYPE; |
+ if (!obj->needs_access_check() && |
+ obj->named_property_handler()->IsUndefined() && |
+ obj->indexed_property_handler()->IsUndefined()) { |
+ type = JS_OBJECT_TYPE; |
+ } else { |
+ type = JS_SPECIAL_API_OBJECT_TYPE; |
+ } |
instance_size += JSObject::kHeaderSize; |
break; |
case GlobalObjectType: |