Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index 551b048411cf44e2226f8a317cc4cb0c71dd6667..9027676c5c8faeb7b8cd9c91968699f37ee6333e 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -2870,7 +2870,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionGetScript) { |
Handle<Object> script = Handle<Object>(fun->shared()->script(), isolate); |
if (!script->IsScript()) return isolate->heap()->undefined_value(); |
- return *GetScriptWrapper(Handle<Script>::cast(script)); |
+ return *Script::GetWrapper(Handle<Script>::cast(script)); |
} |
@@ -5727,7 +5727,8 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_GetPropertyNames) { |
isolate->counters()->for_in()->Increment(); |
Handle<FixedArray> elements; |
ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
- isolate, elements, GetKeysInFixedArrayFor(object, INCLUDE_PROTOS)); |
+ isolate, elements, |
+ JSReceiver::GetKeys(object, JSReceiver::INCLUDE_PROTOS)); |
return *isolate->factory()->NewJSArrayWithElements(elements); |
} |
@@ -5749,7 +5750,8 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_GetPropertyNamesFast) { |
Handle<JSReceiver> object(raw_object); |
Handle<FixedArray> content; |
ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
- isolate, content, GetKeysInFixedArrayFor(object, INCLUDE_PROTOS)); |
+ isolate, content, |
+ JSReceiver::GetKeys(object, JSReceiver::INCLUDE_PROTOS)); |
// Test again, since cache may have been built by preceding call. |
if (object->IsSimpleEnum()) return object->map(); |
@@ -5931,8 +5933,10 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_GetNamedInterceptorPropertyNames) { |
CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0); |
if (obj->HasNamedInterceptor()) { |
- v8::Handle<v8::Array> result = GetKeysForNamedInterceptor(obj, obj); |
- if (!result.IsEmpty()) return *v8::Utils::OpenHandle(*result); |
+ Handle<JSArray> result; |
+ if (JSObject::GetKeysForNamedInterceptor(obj, obj).ToHandle(&result)) { |
+ return *result; |
+ } |
} |
return isolate->heap()->undefined_value(); |
} |
@@ -5946,8 +5950,10 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_GetIndexedInterceptorElementNames) { |
CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0); |
if (obj->HasIndexedInterceptor()) { |
- v8::Handle<v8::Array> result = GetKeysForIndexedInterceptor(obj, obj); |
- if (!result.IsEmpty()) return *v8::Utils::OpenHandle(*result); |
+ Handle<JSArray> result; |
+ if (JSObject::GetKeysForIndexedInterceptor(obj, obj).ToHandle(&result)) { |
+ return *result; |
+ } |
} |
return isolate->heap()->undefined_value(); |
} |
@@ -5977,7 +5983,8 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_LocalKeys) { |
Handle<FixedArray> contents; |
ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
- isolate, contents, GetKeysInFixedArrayFor(object, LOCAL_ONLY)); |
+ isolate, contents, |
+ JSReceiver::GetKeys(object, JSReceiver::LOCAL_ONLY)); |
// Some fast paths through GetKeysInFixedArrayFor reuse a cached |
// property array and since the result is mutable we have to create |
@@ -11448,7 +11455,9 @@ MUST_USE_RESULT static MaybeHandle<JSObject> MaterializeLocalContext( |
Handle<JSObject> ext(JSObject::cast(function_context->extension())); |
Handle<FixedArray> keys; |
ASSIGN_RETURN_ON_EXCEPTION( |
- isolate, keys, GetKeysInFixedArrayFor(ext, INCLUDE_PROTOS), JSObject); |
+ isolate, keys, |
+ JSReceiver::GetKeys(ext, JSReceiver::INCLUDE_PROTOS), |
+ JSObject); |
for (int i = 0; i < keys->length(); i++) { |
// Names of variables introduced by eval are strings. |
@@ -11603,7 +11612,8 @@ MUST_USE_RESULT static MaybeHandle<JSObject> MaterializeClosure( |
Handle<JSObject> ext(JSObject::cast(context->extension())); |
Handle<FixedArray> keys; |
ASSIGN_RETURN_ON_EXCEPTION( |
- isolate, keys, GetKeysInFixedArrayFor(ext, INCLUDE_PROTOS), JSObject); |
+ isolate, keys, |
+ JSReceiver::GetKeys(ext, JSReceiver::INCLUDE_PROTOS), JSObject); |
for (int i = 0; i < keys->length(); i++) { |
HandleScope scope(isolate); |
@@ -12937,7 +12947,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugGetLoadedScripts) { |
// instances->set(i, *GetScriptWrapper(script)) |
// is unsafe as GetScriptWrapper might call GC and the C++ compiler might |
// already have dereferenced the instances handle. |
- Handle<JSValue> wrapper = GetScriptWrapper(script); |
+ Handle<JSObject> wrapper = Script::GetWrapper(script); |
instances->set(i, *wrapper); |
} |
@@ -13348,7 +13358,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_LiveEditReplaceScript) { |
if (old_script->IsScript()) { |
Handle<Script> script_handle = Handle<Script>::cast(old_script); |
- return *(GetScriptWrapper(script_handle)); |
+ return *Script::GetWrapper(script_handle); |
} else { |
return isolate->heap()->null_value(); |
} |
@@ -14364,7 +14374,7 @@ static Handle<Object> Runtime_GetScriptFromScriptName( |
if (script.is_null()) return factory->undefined_value(); |
// Return the script found. |
- return GetScriptWrapper(script); |
+ return Script::GetWrapper(script); |
} |