Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1302)

Unified Diff: src/runtime.cc

Issue 253603003: Pass in the prototype to CreateApiFunction rather than setting it on the result. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/factory.cc ('K') | « src/runtime.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« src/factory.cc ('K') | « src/runtime.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698