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

Unified Diff: src/bootstrapper.cc

Issue 268063008: Replace NewFunctionWithPrototype(name, prototype) by NewFunction(name) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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
« no previous file with comments | « no previous file | src/factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index 7dd6cfd8a25a47df2fb3d81b025a5ec6eba1a80c..1848ce3ff6d7bf6fcc248d85feebe601f99dddba 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -461,8 +461,7 @@ Handle<JSFunction> Genesis::CreateEmptyFunction(Isolate* isolate) {
Handle<String> object_name = factory->Object_string();
{ // --- O b j e c t ---
- Handle<JSFunction> object_fun = factory->NewFunctionWithPrototype(
- object_name, factory->null_value());
+ Handle<JSFunction> object_fun = factory->NewFunction(object_name);
Handle<Map> object_function_map =
factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize);
object_fun->set_initial_map(*object_function_map);
@@ -488,7 +487,8 @@ Handle<JSFunction> Genesis::CreateEmptyFunction(Isolate* isolate) {
Handle<String> empty_string =
factory->InternalizeOneByteString(STATIC_ASCII_VECTOR("Empty"));
Handle<Code> code(isolate->builtins()->builtin(Builtins::kEmptyFunction));
- Handle<JSFunction> empty_function = factory->NewFunction(empty_string, code);
+ Handle<JSFunction> empty_function = factory->NewFunction(
+ empty_string, MaybeHandle<Object>(), code);
// --- E m p t y ---
Handle<String> source = factory->NewStringFromStaticAscii("() {}");
@@ -569,7 +569,8 @@ Handle<JSFunction> Genesis::GetThrowTypeErrorFunction() {
STATIC_ASCII_VECTOR("ThrowTypeError"));
Handle<Code> code(isolate()->builtins()->builtin(
Builtins::kStrictModePoisonPill));
- throw_type_error_function = factory()->NewFunction(name, code);
+ throw_type_error_function = factory()->NewFunction(
+ name, MaybeHandle<Object>(), code);
throw_type_error_function->set_map(native_context()->sloppy_function_map());
throw_type_error_function->shared()->DontAdaptArguments();
@@ -1026,8 +1027,7 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> inner_global,
{ // -- J S O N
Handle<String> name = factory->InternalizeUtf8String("JSON");
- Handle<JSFunction> cons = factory->NewFunctionWithPrototype(
- name, factory->the_hole_value());
+ Handle<JSFunction> cons = factory->NewFunction(name);
JSFunction::SetInstancePrototype(cons,
Handle<Object>(native_context()->initial_object_prototype(), isolate));
cons->SetInstanceClassName(*name);
@@ -1670,8 +1670,7 @@ bool Genesis::InstallNatives() {
set_builtins(*builtins);
// Create a bridge function that has context in the native context.
- Handle<JSFunction> bridge = factory()->NewFunctionWithPrototype(
- factory()->empty_string(), factory()->undefined_value());
+ Handle<JSFunction> bridge = factory()->NewFunction(factory()->empty_string());
ASSERT(bridge->context() == *isolate()->native_context());
// Allocate the builtins context.
« no previous file with comments | « no previous file | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698