| Index: src/bootstrapper.cc
|
| diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
|
| index 5c77aa4e95a8d2d22a112838e376cc1ee45039ba..30e9bec4f3ea6b4ace4fd05ce3eb75fd2956d432 100644
|
| --- a/src/bootstrapper.cc
|
| +++ b/src/bootstrapper.cc
|
| @@ -1699,6 +1699,7 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
|
| shared->set_instance_class_name(isolate->heap()->RegExp_string());
|
| shared->DontAdaptArguments();
|
| shared->set_length(2);
|
| +
|
| {
|
| // RegExp.prototype setup.
|
|
|
| @@ -1767,7 +1768,7 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
|
|
|
| // Store the initial RegExp.prototype map. This is used in fast-path
|
| // checks. Do not alter the prototype after this point.
|
| - isolate->native_context()->set_regexp_prototype_map(prototype->map());
|
| + native_context()->set_regexp_prototype_map(prototype->map());
|
| }
|
|
|
| {
|
| @@ -1873,8 +1874,15 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
|
| function->shared()->set_internal_formal_parameter_count(2);
|
| function->shared()->set_length(2);
|
| function->shared()->set_native(true);
|
| - isolate->native_context()->set(Context::REGEXP_INTERNAL_MATCH, *function);
|
| + native_context()->set(Context::REGEXP_INTERNAL_MATCH, *function);
|
| }
|
| +
|
| + // Create the last match info. One for external use, and one for internal
|
| + // use when we don't want to modify the externally visible match info.
|
| + Handle<RegExpMatchInfo> last_match_info = factory->NewRegExpMatchInfo();
|
| + native_context()->set_regexp_last_match_info(*last_match_info);
|
| + Handle<RegExpMatchInfo> internal_match_info = factory->NewRegExpMatchInfo();
|
| + native_context()->set_regexp_internal_match_info(*internal_match_info);
|
| }
|
|
|
| { // -- E r r o r
|
|
|