Index: src/api-natives.cc |
diff --git a/src/api-natives.cc b/src/api-natives.cc |
index d2cb49e33de40b1b287574cc0824b331082e1327..7fddca8c22facdcd05ea2b21d350b57464c67716 100644 |
--- a/src/api-natives.cc |
+++ b/src/api-natives.cc |
@@ -545,7 +545,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: |