Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index 2e92efb37b585a03d0831a7601d856487cfb2485..1b25ae3a4a01baef82b5f87cbd3bd59c66609e48 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -2134,9 +2134,10 @@ RUNTIME_FUNCTION(Runtime_RegExpCompile) { |
RUNTIME_FUNCTION(Runtime_CreateApiFunction) { |
HandleScope scope(isolate); |
- ASSERT(args.length() == 1); |
+ ASSERT(args.length() == 2); |
CONVERT_ARG_HANDLE_CHECKED(FunctionTemplateInfo, data, 0); |
- return *isolate->factory()->CreateApiFunction(data); |
+ CONVERT_ARG_HANDLE_CHECKED(Object, prototype, 1); |
+ return *isolate->factory()->CreateApiFunction(data, prototype); |
} |
@@ -2805,7 +2806,8 @@ static Handle<JSFunction> InstallBuiltin(Isolate* isolate, |
Handle<String> key = isolate->factory()->InternalizeUtf8String(name); |
Handle<Code> code(isolate->builtins()->builtin(builtin_name)); |
Handle<JSFunction> optimized = |
- isolate->factory()->NewFunction(key, |
+ isolate->factory()->NewFunction(MaybeHandle<Object>(), |
+ key, |
JS_OBJECT_TYPE, |
JSObject::kHeaderSize, |
code, |