Merge remote-tracking branch 'origin/tracking' into custom

This commit is contained in:
roytam1 2022-09-19 16:22:22 +08:00
commit 1e93ef4c00
9 changed files with 25 additions and 18 deletions

View file

@ -665,7 +665,7 @@ js::regexp_multiline(JSContext* cx, unsigned argc, JS::Value* vp)
// ES 2018 dotAll
MOZ_ALWAYS_INLINE bool
regexp_dotall_impl(JSContext* cx, const CallArgs& args)
regexp_dotAll_impl(JSContext* cx, const CallArgs& args)
{
MOZ_ASSERT(IsRegExpInstanceOrPrototype(args.thisv()));
@ -675,15 +675,15 @@ regexp_dotall_impl(JSContext* cx, const CallArgs& args)
}
Rooted<RegExpObject*> reObj(cx, &args.thisv().toObject().as<RegExpObject>());
args.rval().setBoolean(reObj->dotall());
args.rval().setBoolean(reObj->dotAll());
return true;
}
bool
js::regexp_dotall(JSContext* cx, unsigned argc, JS::Value* vp)
js::regexp_dotAll(JSContext* cx, unsigned argc, JS::Value* vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
return CallNonGenericMethod<IsRegExpInstanceOrPrototype, regexp_dotall_impl>(cx, args);
return CallNonGenericMethod<IsRegExpInstanceOrPrototype, regexp_dotAll_impl>(cx, args);
}
// ES 2017 draft rev32 21.2.5.10.
@ -781,7 +781,7 @@ const JSPropertySpec js::regexp_properties[] = {
JS_PSG("source", regexp_source, 0),
JS_PSG("sticky", regexp_sticky, 0),
JS_PSG("unicode", regexp_unicode, 0),
JS_PSG("dotall", regexp_dotall, 0),
JS_PSG("dotAll", regexp_dotAll, 0),
JS_PS_END
};
@ -1667,10 +1667,10 @@ js::RegExpPrototypeOptimizableRaw(JSContext* cx, JSObject* proto)
return false;
JSNative dotAllGetter;
if (!GetOwnNativeGetterPure(cx, proto, NameToId(cx->names().dotall), &dotAllGetter))
if (!GetOwnNativeGetterPure(cx, proto, NameToId(cx->names().dotAll), &dotAllGetter))
return false;
if (dotAllGetter != regexp_dotall)
if (dotAllGetter != regexp_dotAll)
return false;
// Check if @@match, @@search, and exec are own data properties,

View file

@ -153,7 +153,7 @@ regexp_sticky(JSContext* cx, unsigned argc, JS::Value* vp);
extern MOZ_MUST_USE bool
regexp_unicode(JSContext* cx, unsigned argc, JS::Value* vp);
extern MOZ_MUST_USE bool
regexp_dotall(JSContext* cx, unsigned argc, JS::Value* vp);
regexp_dotAll(JSContext* cx, unsigned argc, JS::Value* vp);
} /* namespace js */

View file

@ -34,7 +34,7 @@ function RegExpFlagsGetter() {
result += "y";
// ES2018
if (R.dotall)
if (R.dotAll)
result += "s";
// Step 19.

View file

@ -99,7 +99,7 @@
macro(displayURL, displayURL, "displayURL") \
macro(do, do_, "do") \
macro(done, done, "done") \
macro(dotall, dotall, "dotall") \
macro(dotAll, dotAll, "dotAll") \
macro(dotGenerator, dotGenerator, ".generator") \
macro(dotThis, dotThis, ".this") \
macro(each, each, "each") \

View file

@ -167,6 +167,10 @@ RegExpObject::isOriginalFlagGetter(JSNative native, RegExpFlag* mask)
*mask = UnicodeFlag;
return true;
}
if (native == regexp_dotAll) {
*mask = DotAllFlag;
return true;
}
return false;
}
@ -1016,7 +1020,7 @@ RegExpShared::compile(JSContext* cx, HandleAtom pattern, HandleLinearString inpu
irregexp::RegExpCompileData data;
if (!irregexp::ParsePattern(dummyTokenStream, cx->tempLifoAlloc(), pattern,
multiline(), mode == MatchOnly, unicode(), ignoreCase(),
global(), sticky(), dotall(), &data))
global(), sticky(), dotAll(), &data))
{
return false;
}
@ -1468,6 +1472,10 @@ ParseRegExpFlags(const CharT* chars, size_t length, RegExpFlag* flagsOut, char16
if (!HandleRegExpFlag(MultilineFlag, flagsOut))
return false;
break;
case 's':
if (!HandleRegExpFlag(DotAllFlag, flagsOut))
return false;
break;
case 'y':
if (!HandleRegExpFlag(StickyFlag, flagsOut))
return false;

View file

@ -194,7 +194,7 @@ class RegExpShared
bool multiline() const { return flags & MultilineFlag; }
bool sticky() const { return flags & StickyFlag; }
bool unicode() const { return flags & UnicodeFlag; }
bool dotall() const { return flags & DotAllFlag; }
bool dotAll() const { return flags & DotAllFlag; }
bool isCompiled(CompilationMode mode, bool latin1,
ForceByteCodeEnum force = DontForceByteCode) const {
@ -482,7 +482,7 @@ class RegExpObject : public NativeObject
bool multiline() const { return getFlags() & MultilineFlag; }
bool sticky() const { return getFlags() & StickyFlag; }
bool unicode() const { return getFlags() & UnicodeFlag; }
bool dotall() const { return getFlags() & DotAllFlag; }
bool dotAll() const { return getFlags() & DotAllFlag; }
static bool isOriginalFlagGetter(JSNative native, RegExpFlag* mask);

View file

@ -8,12 +8,11 @@ XPIDL_SOURCES += ['nsIFormAutofillContentService.idl']
XPIDL_MODULE = 'toolkit_formautofill'
EXTRA_COMPONENTS += [
'formautofill.manifest',
'FormAutofillContentService.js',
'FormAutofillStartup.js',
]
EXTRA_PP_COMPONENTS += ['formautofill.manifest']
EXTRA_JS_MODULES += [
'content/RequestAutocompleteUI.jsm',
'FormAutofill.jsm',

View file

@ -13,9 +13,9 @@ toolkit.jar:
content/global/aboutAbout.js
content/global/aboutAbout.xhtml
#ifdef MOZ_OFFICIAL_BRANDING
* content/global/aboutRights.xhtml
content/global/aboutRights.xhtml
#else
* content/global/aboutRights.xhtml (aboutRights-unbranded.xhtml)
content/global/aboutRights.xhtml (aboutRights-unbranded.xhtml)
#endif
content/global/aboutNetworking.js
content/global/aboutNetworking.xhtml

View file

@ -10,6 +10,7 @@ EXTRA_JS_MODULES += [
'addons/WebNavigation.jsm',
'addons/WebNavigationContent.js',
'addons/WebNavigationFrames.jsm',
'addons/WebRequest.jsm',
'addons/WebRequestCommon.jsm',
'addons/WebRequestContent.js',
'addons/WebRequestUpload.jsm',
@ -84,7 +85,6 @@ EXTRA_JS_MODULES.third_party.jsesc += ['third_party/jsesc/jsesc.js']
EXTRA_JS_MODULES.sessionstore += ['sessionstore/Utils.jsm']
EXTRA_PP_JS_MODULES += [
'addons/WebRequest.jsm',
'ResetProfile.jsm',
'Troubleshoot.jsm',
'UpdateUtils.jsm',