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

Unified Diff: src/js/harmony-regexp.js

Issue 1416093006: Unify setting accessor properties in native code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 1 month 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 | src/js/messages.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/harmony-regexp.js
diff --git a/src/js/harmony-regexp.js b/src/js/harmony-regexp.js
index 54a96bc972c762aa2042891d6a469d63ffeb22fc..eadf1d237cb96bb70b13014913829ff5bdb051f3 100644
--- a/src/js/harmony-regexp.js
+++ b/src/js/harmony-regexp.js
@@ -36,8 +36,6 @@ function RegExpGetFlags() {
if (this.sticky) result += 'y';
return result;
}
-%FunctionSetName(RegExpGetFlags, "RegExp.prototype.flags");
-%SetNativeFlag(RegExpGetFlags);
// ES6 21.2.5.12.
@@ -61,12 +59,8 @@ function RegExpGetUnicode() {
%FunctionSetName(RegExpGetUnicode, "RegExp.prototype.unicode");
%SetNativeFlag(RegExpGetUnicode);
-%DefineGetterPropertyUnchecked(GlobalRegExp.prototype, 'flags',
- RegExpGetFlags, DONT_ENUM);
+utils.InstallGetter(GlobalRegExp.prototype, 'flags', RegExpGetFlags);
+utils.InstallGetter(GlobalRegExp.prototype, 'sticky', RegExpGetSticky);
+utils.InstallGetter(GlobalRegExp.prototype, 'unicode', RegExpGetUnicode);
-%DefineGetterPropertyUnchecked(GlobalRegExp.prototype, "sticky",
- RegExpGetSticky, DONT_ENUM);
-
-%DefineGetterPropertyUnchecked(GlobalRegExp.prototype, "unicode",
- RegExpGetUnicode, DONT_ENUM);
})
« no previous file with comments | « no previous file | src/js/messages.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698