Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Unified Diff: src/api-natives.cc

Issue 1751043002: Speed up the LookupIterator (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix proxy + private symbols Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/v8.h ('k') | src/heap/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:
« no previous file with comments | « include/v8.h ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698