Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index 10de6f9e5ec001c595a0b86632599f9be9a22074..446e1c5c24b31b87712005a9781abfff801806ab 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -2780,16 +2780,13 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionSetLength) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionSetPrototype) { |
- SealHandleScope shs(isolate); |
+ HandleScope scope(isolate); |
ASSERT(args.length() == 2); |
- CONVERT_ARG_CHECKED(JSFunction, fun, 0); |
+ CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0); |
+ CONVERT_ARG_HANDLE_CHECKED(Object, value, 1); |
ASSERT(fun->should_have_prototype()); |
- Object* obj; |
- { MaybeObject* maybe_obj = |
- Accessors::FunctionSetPrototype(fun, args[1], NULL); |
- if (!maybe_obj->ToObject(&obj)) return maybe_obj; |
- } |
+ Accessors::FunctionSetPrototype(fun, value); |
return args[0]; // return TOS |
} |