Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index 3c5f4161fd00f8c162a8c0c21903cceeb8e9260f..e197494e6b56176b101af20f5cbb48e0c1da39fd 100644 |
--- a/src/factory.cc |
+++ b/src/factory.cc |
@@ -1278,16 +1278,9 @@ Handle<JSFunction> Factory::NewFunctionWithoutPrototype(Handle<String> name, |
Handle<JSFunction> Factory::NewFunction(Handle<String> name, Handle<Code> code, |
Handle<Object> prototype, |
- bool read_only_prototype, |
bool is_strict) { |
- // In strict mode, readonly strict map is only available during bootstrap |
- DCHECK(!is_strict || !read_only_prototype || |
- isolate()->bootstrapper()->IsActive()); |
- Handle<Map> map = |
- is_strict ? isolate()->strict_function_map() |
- : read_only_prototype |
- ? isolate()->sloppy_function_with_readonly_prototype_map() |
- : isolate()->sloppy_function_map(); |
+ Handle<Map> map = is_strict ? isolate()->strict_function_map() |
+ : isolate()->sloppy_function_map(); |
Handle<JSFunction> result = NewFunction(map, name, code); |
result->set_prototype_or_initial_map(*prototype); |
return result; |
@@ -1297,12 +1290,9 @@ Handle<JSFunction> Factory::NewFunction(Handle<String> name, Handle<Code> code, |
Handle<JSFunction> Factory::NewFunction(Handle<String> name, Handle<Code> code, |
Handle<Object> prototype, |
InstanceType type, int instance_size, |
- bool read_only_prototype, |
- bool install_constructor, |
bool is_strict) { |
// Allocate the function |
- Handle<JSFunction> function = |
- NewFunction(name, code, prototype, read_only_prototype, is_strict); |
+ Handle<JSFunction> function = NewFunction(name, code, prototype, is_strict); |
ElementsKind elements_kind = |
type == JS_ARRAY_TYPE ? FAST_SMI_ELEMENTS : FAST_HOLEY_SMI_ELEMENTS; |
@@ -1313,9 +1303,6 @@ Handle<JSFunction> Factory::NewFunction(Handle<String> name, Handle<Code> code, |
if (!function->shared()->is_resumable()) { |
if (prototype->IsTheHole(isolate())) { |
prototype = NewFunctionPrototype(function); |
- } else if (install_constructor) { |
- JSObject::AddProperty(Handle<JSObject>::cast(prototype), |
- constructor_string(), function, DONT_ENUM); |
} |
} |