Bug 1531830 - Part 1: Ship String.prototype.matchAll and Symbol.matchAll. r=jwalden
authorJason Orendorff <jorendorff@mozilla.com>
Thu, 07 Mar 2019 00:50:39 +0000
changeset 520682 e36d2c8de6c60732da41f4cef99c5c1a92d4b029
parent 520681 b52eb25bbe9c8b4ecf2bdc807e0f71740ff0870c
child 520683 14391e1ce086f4164c3609c12845436901cd2fad
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwalden
bugs1531830
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1531830 - Part 1: Ship String.prototype.matchAll and Symbol.matchAll. r=jwalden No pref; the feature is not risky or complicated enough to warrant it. It's easy enough to back this out if need be. Differential Revision: https://phabricator.services.mozilla.com/D22370
js/src/builtin/RegExp.cpp
js/src/builtin/String.cpp
js/src/builtin/Symbol.cpp
--- a/js/src/builtin/RegExp.cpp
+++ b/js/src/builtin/RegExp.cpp
@@ -778,19 +778,17 @@ const JSPropertySpec js::regexp_properti
 
 const JSFunctionSpec js::regexp_methods[] = {
     JS_SELF_HOSTED_FN(js_toSource_str, "RegExpToString", 0, 0),
     JS_SELF_HOSTED_FN(js_toString_str, "RegExpToString", 0, 0),
     JS_FN("compile", regexp_compile, 2, 0),
     JS_SELF_HOSTED_FN("exec", "RegExp_prototype_Exec", 1, 0),
     JS_SELF_HOSTED_FN("test", "RegExpTest", 1, 0),
     JS_SELF_HOSTED_SYM_FN(match, "RegExpMatch", 1, 0),
-#ifdef NIGHTLY_BUILD
     JS_SELF_HOSTED_SYM_FN(matchAll, "RegExpMatchAll", 1, 0),
-#endif
     JS_SELF_HOSTED_SYM_FN(replace, "RegExpReplace", 2, 0),
     JS_SELF_HOSTED_SYM_FN(search, "RegExpSearch", 1, 0),
     JS_SELF_HOSTED_SYM_FN(split, "RegExpSplit", 2, 0),
     JS_FS_END};
 
 #define STATIC_PAREN_GETTER_CODE(parenNum)                        \
   if (!res->createParen(cx, parenNum, args.rval())) return false; \
   if (args.rval().isUndefined())                                  \
--- a/js/src/builtin/String.cpp
+++ b/js/src/builtin/String.cpp
@@ -3372,19 +3372,17 @@ static const JSFunctionSpec string_metho
 #endif
     JS_SELF_HOSTED_FN("repeat", "String_repeat", 1, 0),
 #if EXPOSE_INTL_API
     JS_FN("normalize", str_normalize, 0, 0),
 #endif
 
     /* Perl-ish methods (search is actually Python-esque). */
     JS_SELF_HOSTED_FN("match", "String_match", 1, 0),
-#ifdef NIGHTLY_BUILD
     JS_SELF_HOSTED_FN("matchAll", "String_matchAll", 1, 0),
-#endif
     JS_SELF_HOSTED_FN("search", "String_search", 1, 0),
     JS_SELF_HOSTED_FN("replace", "String_replace", 2, 0),
     JS_SELF_HOSTED_FN("split", "String_split", 2, 0),
     JS_SELF_HOSTED_FN("substr", "String_substr", 2, 0),
 
     /* Python-esque sequence methods. */
     JS_FN("concat", str_concat, 1, 0),
     JS_SELF_HOSTED_FN("slice", "String_slice", 2, 0),
--- a/js/src/builtin/Symbol.cpp
+++ b/js/src/builtin/Symbol.cpp
@@ -60,21 +60,16 @@ JSObject* SymbolObject::initClass(JSCont
 
   if (defineMembers) {
     // Define the well-known symbol properties, such as Symbol.iterator.
     ImmutablePropertyNamePtr* names = cx->names().wellKnownSymbolNames();
     RootedValue value(cx);
     unsigned attrs = JSPROP_READONLY | JSPROP_PERMANENT;
     WellKnownSymbols* wks = cx->runtime()->wellKnownSymbols;
     for (size_t i = 0; i < JS::WellKnownSymbolLimit; i++) {
-#ifndef NIGHTLY_BUILD
-      if (i == static_cast<size_t>(SymbolCode::matchAll)) {
-        continue;
-      }
-#endif
       value.setSymbol(wks->get(i));
       if (!NativeDefineDataProperty(cx, ctor, names[i], value, attrs)) {
         return nullptr;
       }
     }
   }
 
   if (!LinkConstructorAndPrototype(cx, ctor, proto)) {