Chromium Code Reviews| Index: src/bootstrapper.cc |
| diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc |
| index 2852e8f4152d9665d9d2eda137f2e12e6b7dff40..d31c7d9c6ff07cc641c9b60fa44766a1bb411df1 100644 |
| --- a/src/bootstrapper.cc |
| +++ b/src/bootstrapper.cc |
| @@ -1663,6 +1663,19 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object, |
| initial_map->set_unused_property_fields(0); |
| initial_map->set_instance_size(initial_map->instance_size() + |
| num_fields * kPointerSize); |
| + |
| + { |
| + // RegExp.prototype setup. |
| + |
| + Handle<JSObject> proto = |
| + factory->NewJSObject(isolate->object_function(), TENURED); |
| + JSObject::AddProperty(proto, factory->constructor_string(), regexp_fun, |
| + DONT_ENUM); |
| + Accessors::FunctionSetPrototype(regexp_fun, proto).Assert(); |
|
Igor Sheludko
2016/09/29 12:55:28
I think you can pass the right prototype object to
jgruber
2016/09/29 14:40:26
Done.
|
| + |
| + SimpleInstallFunction(proto, "exec", Builtins::kRegExpPrototypeExec, 1, |
| + true, DONT_ENUM); |
| + } |
| } |
| { // -- E r r o r |