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

Unified Diff: src/builtins/builtins-regexp.cc

Issue 2577653002: [regexp] Let RegExp.prototype.compile return this (Closed)
Patch Set: Created 4 years 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 | « no previous file | test/mjsunit/regress/regress-585775.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/builtins-regexp.cc
diff --git a/src/builtins/builtins-regexp.cc b/src/builtins/builtins-regexp.cc
index c0247cb77bcbb35c6a8e050ac19a14dffa5040d5..f3c116cc8590aef07a48f70ac325157a84037ef5 100644
--- a/src/builtins/builtins-regexp.cc
+++ b/src/builtins/builtins-regexp.cc
@@ -852,12 +852,9 @@ TF_BUILTIN(RegExpPrototypeCompile, RegExpBuiltinsAssembler) {
Bind(&next);
}
- RegExpInitialize(context, receiver, var_pattern.value(), var_flags.value());
-
- // Return undefined for compatibility with JSC.
- // See http://crbug.com/585775 for web compat details.
-
- Return(UndefinedConstant());
+ Node* const result = RegExpInitialize(context, receiver, var_pattern.value(),
+ var_flags.value());
+ Return(result);
}
// ES6 21.2.5.10.
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-585775.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698