Index: src/js/regexp.js |
diff --git a/src/js/regexp.js b/src/js/regexp.js |
index 495ba37fe9a5fdb662b132283cac6d1b1be93960..51c8ed0d6ee921a523ece0c1e885c6164534ce0d 100644 |
--- a/src/js/regexp.js |
+++ b/src/js/regexp.js |
@@ -12,6 +12,7 @@ |
var FLAG_harmony_regexps; |
var FLAG_harmony_tolength; |
var FLAG_harmony_unicode_regexps; |
+var GlobalObject = global.Object; |
var GlobalRegExp = global.RegExp; |
var InternalPackedArray = utils.InternalPackedArray; |
var MakeTypeError; |
@@ -336,6 +337,7 @@ function RegExpMakeCaptureGetter(n) { |
// ------------------------------------------------------------------- |
%FunctionSetInstanceClassName(GlobalRegExp, 'RegExp'); |
+%FunctionSetPrototype(GlobalRegExp, new GlobalObject()); |
%AddNamedProperty( |
GlobalRegExp.prototype, 'constructor', GlobalRegExp, DONT_ENUM); |
%SetCode(GlobalRegExp, RegExpConstructor); |