| Index: chrome/renderer/extensions/module_system.cc
|
| diff --git a/chrome/renderer/extensions/module_system.cc b/chrome/renderer/extensions/module_system.cc
|
| index c29b440b9829007d9b4d109ac6f5ea296e9ffc3e..b35992ee6cb508dee18b6fc9d8e18014ea6c99d3 100644
|
| --- a/chrome/renderer/extensions/module_system.cc
|
| +++ b/chrome/renderer/extensions/module_system.cc
|
| @@ -189,6 +189,8 @@ v8::Handle<v8::Value> ModuleSystem::RequireForJsInner(
|
|
|
| exports = v8::Object::New();
|
| v8::Handle<v8::Object> natives(NewInstance());
|
| + CHECK(!natives.IsEmpty()); // this can happen if v8 has issues
|
| +
|
| // These must match the argument order in WrapSource.
|
| v8::Handle<v8::Value> args[] = {
|
| // CommonJS.
|
| @@ -199,6 +201,8 @@ v8::Handle<v8::Value> ModuleSystem::RequireForJsInner(
|
| context_->safe_builtins()->GetArray(),
|
| context_->safe_builtins()->GetFunction(),
|
| context_->safe_builtins()->GetObjekt(),
|
| + context_->safe_builtins()->GetRegExp(),
|
| + context_->safe_builtins()->GetString(),
|
| };
|
| {
|
| v8::TryCatch try_catch;
|
| @@ -482,7 +486,7 @@ v8::Handle<v8::String> ModuleSystem::WrapSource(v8::Handle<v8::String> source) {
|
| // Keep in order with the arguments in RequireForJsInner.
|
| v8::Handle<v8::String> left = v8::String::New(
|
| "(function(require, requireNative, exports,"
|
| - "$Array, $Function, $Object) {"
|
| + "$Array, $Function, $Object, $RegExp, $String) {"
|
| "'use strict';");
|
| v8::Handle<v8::String> right = v8::String::New("\n})");
|
| return handle_scope.Close(
|
|
|