Index: src/runtime/runtime-classes.cc |
diff --git a/src/runtime/runtime-classes.cc b/src/runtime/runtime-classes.cc |
index 95a65f53ad93646d8757a9a1596d4d842cf39efa..dedff928a79618606824127258f3c9d6930ceffa 100644 |
--- a/src/runtime/runtime-classes.cc |
+++ b/src/runtime/runtime-classes.cc |
@@ -120,8 +120,7 @@ RUNTIME_FUNCTION(Runtime_DefineClass) { |
ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
isolate, prototype_parent, |
Runtime::GetObjectProperty(isolate, super_class, |
- isolate->factory()->prototype_string(), |
- SLOPPY)); |
+ isolate->factory()->prototype_string())); |
if (!prototype_parent->IsNull() && !prototype_parent->IsSpecObject()) { |
THROW_NEW_ERROR_RETURN_FAILURE( |
isolate, NewTypeError(MessageTemplate::kPrototypeParentNotAnObject, |
@@ -245,87 +244,64 @@ RUNTIME_FUNCTION(Runtime_ClassGetSourceCode) { |
} |
-static MaybeHandle<Object> LoadFromSuper(Isolate* isolate, |
- Handle<Object> receiver, |
- Handle<JSObject> home_object, |
- Handle<Name> name, |
- LanguageMode language_mode) { |
+static Object* LoadFromSuper(Isolate* isolate, Handle<Object> receiver, |
+ Handle<JSObject> home_object, Handle<Name> name) { |
if (home_object->IsAccessCheckNeeded() && !isolate->MayAccess(home_object)) { |
isolate->ReportFailedAccessCheck(home_object); |
- RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, Object); |
+ RETURN_FAILURE_IF_SCHEDULED_EXCEPTION(isolate); |
} |
PrototypeIterator iter(isolate, home_object); |
Handle<Object> proto = PrototypeIterator::GetCurrent(iter); |
- if (!proto->IsJSReceiver()) { |
- return Object::ReadAbsentProperty(isolate, proto, name, language_mode); |
- } |
+ if (!proto->IsJSReceiver()) return isolate->heap()->undefined_value(); |
LookupIterator it(receiver, name, Handle<JSReceiver>::cast(proto)); |
Handle<Object> result; |
- ASSIGN_RETURN_ON_EXCEPTION(isolate, result, |
- Object::GetProperty(&it, language_mode), Object); |
- return result; |
+ ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, Object::GetProperty(&it)); |
+ return *result; |
} |
-static MaybeHandle<Object> LoadElementFromSuper(Isolate* isolate, |
- Handle<Object> receiver, |
- Handle<JSObject> home_object, |
- uint32_t index, |
- LanguageMode language_mode) { |
+static Object* LoadElementFromSuper(Isolate* isolate, Handle<Object> receiver, |
+ Handle<JSObject> home_object, |
+ uint32_t index) { |
if (home_object->IsAccessCheckNeeded() && !isolate->MayAccess(home_object)) { |
isolate->ReportFailedAccessCheck(home_object); |
- RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, Object); |
+ RETURN_FAILURE_IF_SCHEDULED_EXCEPTION(isolate); |
} |
PrototypeIterator iter(isolate, home_object); |
Handle<Object> proto = PrototypeIterator::GetCurrent(iter); |
- if (!proto->IsJSReceiver()) { |
- Handle<Object> name = isolate->factory()->NewNumberFromUint(index); |
- return Object::ReadAbsentProperty(isolate, proto, name, language_mode); |
- } |
+ if (!proto->IsJSReceiver()) return isolate->heap()->undefined_value(); |
LookupIterator it(isolate, receiver, index, Handle<JSReceiver>::cast(proto)); |
Handle<Object> result; |
- ASSIGN_RETURN_ON_EXCEPTION(isolate, result, |
- Object::GetProperty(&it, language_mode), Object); |
- return result; |
+ ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, Object::GetProperty(&it)); |
+ return *result; |
} |
RUNTIME_FUNCTION(Runtime_LoadFromSuper) { |
HandleScope scope(isolate); |
- DCHECK(args.length() == 4); |
+ DCHECK(args.length() == 3); |
CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0); |
CONVERT_ARG_HANDLE_CHECKED(JSObject, home_object, 1); |
CONVERT_ARG_HANDLE_CHECKED(Name, name, 2); |
- CONVERT_LANGUAGE_MODE_ARG_CHECKED(language_mode, 3); |
- Handle<Object> result; |
- ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
- isolate, result, |
- LoadFromSuper(isolate, receiver, home_object, name, language_mode)); |
- return *result; |
+ return LoadFromSuper(isolate, receiver, home_object, name); |
} |
RUNTIME_FUNCTION(Runtime_LoadKeyedFromSuper) { |
HandleScope scope(isolate); |
- DCHECK(args.length() == 4); |
+ DCHECK(args.length() == 3); |
CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0); |
CONVERT_ARG_HANDLE_CHECKED(JSObject, home_object, 1); |
CONVERT_ARG_HANDLE_CHECKED(Object, key, 2); |
- CONVERT_LANGUAGE_MODE_ARG_CHECKED(language_mode, 3); |
uint32_t index = 0; |
- Handle<Object> result; |
- |
if (key->ToArrayIndex(&index)) { |
- ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
- isolate, result, LoadElementFromSuper(isolate, receiver, home_object, |
- index, language_mode)); |
- return *result; |
+ return LoadElementFromSuper(isolate, receiver, home_object, index); |
} |
Handle<Name> name; |
@@ -333,15 +309,9 @@ RUNTIME_FUNCTION(Runtime_LoadKeyedFromSuper) { |
Runtime::ToName(isolate, key)); |
// TODO(verwaest): Unify using LookupIterator. |
if (name->AsArrayIndex(&index)) { |
- ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
- isolate, result, LoadElementFromSuper(isolate, receiver, home_object, |
- index, language_mode)); |
- return *result; |
+ return LoadElementFromSuper(isolate, receiver, home_object, index); |
} |
- ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
- isolate, result, |
- LoadFromSuper(isolate, receiver, home_object, name, language_mode)); |
- return *result; |
+ return LoadFromSuper(isolate, receiver, home_object, name); |
} |