Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(686)

Unified Diff: src/js/regexp.js

Issue 1423993006: RegExp.prototype is an ordinary object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/bootstrapper.cc ('k') | test/mjsunit/es6/regexp-prototype.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/bootstrapper.cc ('k') | test/mjsunit/es6/regexp-prototype.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698