Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index 2008acf64e72e24e48dcfecc8b26d9c3adfcdf3d..24c9655a394d2834dae2ee86fb14e6ed0774c43f 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -1862,6 +1862,20 @@ static inline Handle<Object> GetPrototypeSkipHiddenPrototypes( |
} |
+RUNTIME_FUNCTION(Runtime_InternalSetPrototype) { |
+ HandleScope scope(isolate); |
+ DCHECK(args.length() == 2); |
+ CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0); |
+ CONVERT_ARG_HANDLE_CHECKED(Object, prototype, 1); |
+ DCHECK(!obj->IsAccessCheckNeeded()); |
+ DCHECK(!obj->map()->is_observed()); |
+ Handle<Object> result; |
+ ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
+ isolate, result, JSObject::SetPrototype(obj, prototype, false)); |
+ return *result; |
+} |
+ |
+ |
RUNTIME_FUNCTION(Runtime_SetPrototype) { |
HandleScope scope(isolate); |
DCHECK(args.length() == 2); |