Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index e6277060732e9d71feb9d592af657a3dff31e406..028af60b08a6c1a837e190c4c615f6ea2abb73b8 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -2072,6 +2072,30 @@ RUNTIME_FUNCTION(Runtime_HomeObjectSymbol) { |
} |
+RUNTIME_FUNCTION(Runtime_LoadFromSuper) { |
+ HandleScope scope(isolate); |
+ DCHECK(args.length() == 3); |
+ CONVERT_ARG_HANDLE_CHECKED(JSObject, home_object, 0); |
+ CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 1); |
+ CONVERT_ARG_HANDLE_CHECKED(Name, name, 2); |
+ |
+ if (home_object->IsAccessCheckNeeded() && |
+ !isolate->MayNamedAccess(home_object, name, v8::ACCESS_GET)) { |
+ isolate->ReportFailedAccessCheck(home_object, v8::ACCESS_GET); |
+ RETURN_FAILURE_IF_SCHEDULED_EXCEPTION(isolate); |
+ } |
+ |
+ PrototypeIterator iter(isolate, home_object); |
+ Handle<Object> proto = PrototypeIterator::GetCurrent(iter); |
+ if (!proto->IsJSReceiver()) return isolate->heap()->undefined_value(); |
+ |
+ LookupIterator it(receiver, name, Handle<JSReceiver>::cast(proto)); |
+ Handle<Object> result; |
+ ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, Object::GetProperty(&it)); |
+ return *result; |
+} |
+ |
+ |
RUNTIME_FUNCTION(Runtime_IsExtensible) { |
SealHandleScope shs(isolate); |
DCHECK(args.length() == 1); |
@@ -2212,7 +2236,7 @@ static Object* DeclareGlobals(Isolate* isolate, Handle<GlobalObject> global, |
} |
} |
- // Define or redefine own property. |
+ // Define or redefine own pro//perty. |
Toon Verwaest
2014/09/16 13:56:16
remove //
|
RETURN_FAILURE_ON_EXCEPTION(isolate, JSObject::SetOwnPropertyIgnoreAttributes( |
global, name, value, attr)); |
@@ -9518,6 +9542,23 @@ RUNTIME_FUNCTION(Runtime_ThrowReferenceError) { |
} |
+RUNTIME_FUNCTION(Runtime_ThrowNonMethodError) { |
+ HandleScope scope(isolate); |
+ DCHECK(args.length() == 0); |
+ THROW_NEW_ERROR_RETURN_FAILURE( |
+ isolate, NewReferenceError("non_method", HandleVector<Object>(NULL, 0))); |
+} |
+ |
+ |
+RUNTIME_FUNCTION(Runtime_ThrowUnsupportedSuperError) { |
+ HandleScope scope(isolate); |
+ DCHECK(args.length() == 0); |
+ THROW_NEW_ERROR_RETURN_FAILURE( |
+ isolate, |
+ NewReferenceError("unsupported_super", HandleVector<Object>(NULL, 0))); |
+} |
+ |
+ |
RUNTIME_FUNCTION(Runtime_ThrowNotDateError) { |
HandleScope scope(isolate); |
DCHECK(args.length() == 0); |