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

Unified Diff: src/js/harmony-unicode-regexps.js

Issue 1558113002: Add UseCounters for various standards-related code paths (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix accidental redefinition Created 4 years, 11 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/js/harmony-regexp.js ('k') | src/js/i18n.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/harmony-unicode-regexps.js
diff --git a/src/js/harmony-unicode-regexps.js b/src/js/harmony-unicode-regexps.js
index a43939574cc8f9d1da19103f40b882602b3aeda9..aa8fc76bd5eff987577e14997b01b14a82799366 100644
--- a/src/js/harmony-unicode-regexps.js
+++ b/src/js/harmony-unicode-regexps.js
@@ -24,6 +24,9 @@ utils.Import(function(from) {
// ES6 21.2.5.15.
function RegExpGetUnicode() {
if (!IS_REGEXP(this)) {
+ if (this === GlobalRegExpPrototype) {
+ %IncrementUseCounter(kRegExpPrototypeUnicodeGetter);
+ }
throw MakeTypeError(kRegExpNonRegExp, "RegExp.prototype.unicode");
}
return !!REGEXP_UNICODE(this);
« no previous file with comments | « src/js/harmony-regexp.js ('k') | src/js/i18n.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698