Index: src/runtime/runtime-object.cc |
diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc |
index 423d60e5e20c962fd5ab88303a0a2ef91e19df98..0ba8f659ef5e9405d9243a213a22eeee4a14a125 100644 |
--- a/src/runtime/runtime-object.cc |
+++ b/src/runtime/runtime-object.cc |
@@ -304,11 +304,10 @@ RUNTIME_FUNCTION(Runtime_GetOwnProperty) { |
RUNTIME_FUNCTION(Runtime_PreventExtensions) { |
HandleScope scope(isolate); |
DCHECK(args.length() == 1); |
- CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0); |
- Handle<Object> result; |
- ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, |
- JSObject::PreventExtensions(obj)); |
- return *result; |
+ CONVERT_ARG_HANDLE_CHECKED(JSReceiver, obj, 0); |
+ if (JSReceiver::PreventExtensions(obj, THROW_ON_ERROR).IsNothing()) |
+ return isolate->heap()->exception(); |
+ return *obj; |
} |