Merge autoland to mozilla-central a=merge

This commit is contained in:
Norisz Fay 2024-10-28 23:24:44 +02:00
commit a547d790fa
568 changed files with 3273 additions and 2866 deletions

View File

@ -391,7 +391,7 @@ static GType GetMaiAtkType(uint16_t interfacesBits) {
type = g_type_register_static(MAI_TYPE_ATK_OBJECT, atkTypeName, &tinfo,
GTypeFlags(0));
for (uint32_t index = 0; index < ArrayLength(atk_if_infos); index++) {
for (uint32_t index = 0; index < std::size(atk_if_infos); index++) {
if (interfacesBits & (1 << index)) {
g_type_add_interface_static(type,
GetAtkTypeForMai((MaiInterfaceType)index),

View File

@ -550,7 +550,7 @@ void textInterfaceInitCB(AtkTextIface* aIface) {
}
// Cache the string values of the atk text attribute names.
for (uint32_t i = 0; i < ArrayLength(sAtkTextAttrNames); i++) {
for (uint32_t i = 0; i < std::size(sAtkTextAttrNames); i++) {
sAtkTextAttrNames[i] =
atk_text_attribute_get_name(static_cast<AtkTextAttribute>(i));
}

View File

@ -1531,7 +1531,7 @@ uint8_t aria::GetFirstValidRoleMapIndexExcluding(
return Compare(role, aEntry.ARIARoleString(),
nsCaseInsensitiveStringComparator);
};
if (BinarySearchIf(sWAIRoleMaps, 0, ArrayLength(sWAIRoleMaps), comparator,
if (BinarySearchIf(sWAIRoleMaps, 0, std::size(sWAIRoleMaps), comparator,
&idx)) {
return idx;
}
@ -1581,7 +1581,7 @@ bool aria::IsRoleMapIndexValid(uint8_t aRoleMapIndex) {
case LANDMARK_ROLE_MAP_ENTRY_INDEX:
return true;
}
return aRoleMapIndex < ArrayLength(sWAIRoleMaps);
return aRoleMapIndex < std::size(sWAIRoleMaps);
}
uint64_t aria::UniversalStatesFor(mozilla::dom::Element* aElement) {
@ -1593,7 +1593,7 @@ uint64_t aria::UniversalStatesFor(mozilla::dom::Element* aElement) {
}
uint8_t aria::AttrCharacteristicsFor(nsAtom* aAtom) {
for (uint32_t i = 0; i < ArrayLength(gWAIUnivAttrMap); i++) {
for (uint32_t i = 0; i < std::size(gWAIUnivAttrMap); i++) {
if (gWAIUnivAttrMap[i].attributeName == aAtom) {
return gWAIUnivAttrMap[i].characteristics;
}
@ -1615,7 +1615,7 @@ const nsRoleMapEntry* aria::GetRoleMap(const nsStaticAtom* aAriaRole) {
return Compare(role, aEntry.ARIARoleString());
};
size_t idx;
if (BinarySearchIf(sWAIRoleMaps, 0, ArrayLength(sWAIRoleMaps), comparator,
if (BinarySearchIf(sWAIRoleMaps, 0, std::size(sWAIRoleMaps), comparator,
&idx)) {
return GetRoleMapFromIndex(idx);
}

View File

@ -74,7 +74,7 @@ static void EnableLogging(const char* aModulesStr) {
const char* token = aModulesStr;
while (*token != '\0') {
size_t tokenLen = strcspn(token, ",");
for (unsigned int idx = 0; idx < ArrayLength(sModuleMap); idx++) {
for (unsigned int idx = 0; idx < std::size(sModuleMap); idx++) {
if (strncmp(token, sModuleMap[idx].mStr, tokenLen) == 0) {
#if !defined(MOZ_PROFILING) && (!defined(DEBUG) || defined(MOZ_OPTIMIZE))
// Stack tracing on profiling enabled or debug not optimized builds.
@ -977,7 +977,7 @@ bool logging::IsEnabledAll(uint32_t aModules) {
}
bool logging::IsEnabled(const nsAString& aModuleStr) {
for (unsigned int idx = 0; idx < ArrayLength(sModuleMap); idx++) {
for (unsigned int idx = 0; idx < std::size(sModuleMap); idx++) {
if (aModuleStr.EqualsASCII(sModuleMap[idx].mStr)) {
return sModules & sModuleMap[idx].mModule;
}

View File

@ -127,14 +127,14 @@ void TextAttrsMgr::GetAttributes(AccAttributes* aAttributes,
// Expose text attributes if applicable.
if (aAttributes) {
for (uint32_t idx = 0; idx < ArrayLength(attrArray); idx++) {
for (uint32_t idx = 0; idx < std::size(attrArray); idx++) {
attrArray[idx]->Expose(aAttributes, mIncludeDefAttrs);
}
}
// Expose text attributes range where they are applied if applicable.
if (aStartOffset) {
GetRange(attrArray, ArrayLength(attrArray), aStartOffset, aEndOffset);
GetRange(attrArray, std::size(attrArray), aStartOffset, aEndOffset);
}
}

View File

@ -470,7 +470,7 @@ FindDOMTextOffsetAttributes(LocalAccessible* aAcc, int32_t aRenderedStart,
{SelectionType::eSpellCheck, nsGkAtoms::spelling},
{SelectionType::eTargetText, nsGkAtoms::mark},
};
result.SetCapacity(ArrayLength(kSelectionTypesToAttributes));
result.SetCapacity(std::size(kSelectionTypesToAttributes));
for (auto [selType, attr] : kSelectionTypesToAttributes) {
dom::Selection* domSel = frameSel->GetSelection(selType);
if (!domSel) {

View File

@ -453,9 +453,9 @@ uint64_t nsAccessibilityService::gCacheDomains =
nsAccessibilityService::kDefaultCacheDomains;
nsAccessibilityService::nsAccessibilityService()
: mHTMLMarkupMap(ArrayLength(sHTMLMarkupMapList)),
mMathMLMarkupMap(ArrayLength(sMathMLMarkupMapList)),
mXULMarkupMap(ArrayLength(sXULMarkupMapList)) {}
: mHTMLMarkupMap(std::size(sHTMLMarkupMapList)),
mMathMLMarkupMap(std::size(sMathMLMarkupMapList)),
mXULMarkupMap(std::size(sXULMarkupMapList)) {}
nsAccessibilityService::~nsAccessibilityService() {
NS_ASSERTION(IsShutdown(), "Accessibility wasn't shutdown!");
@ -1082,10 +1082,10 @@ already_AddRefed<DOMStringList> nsAccessibilityService::GetStringStates(
void nsAccessibilityService::GetStringEventType(uint32_t aEventType,
nsAString& aString) {
static_assert(
nsIAccessibleEvent::EVENT_LAST_ENTRY == ArrayLength(kEventTypeNames),
nsIAccessibleEvent::EVENT_LAST_ENTRY == std::size(kEventTypeNames),
"nsIAccessibleEvent constants are out of sync to kEventTypeNames");
if (aEventType >= ArrayLength(kEventTypeNames)) {
if (aEventType >= std::size(kEventTypeNames)) {
aString.AssignLiteral("unknown");
return;
}
@ -1095,11 +1095,10 @@ void nsAccessibilityService::GetStringEventType(uint32_t aEventType,
void nsAccessibilityService::GetStringEventType(uint32_t aEventType,
nsACString& aString) {
MOZ_ASSERT(
nsIAccessibleEvent::EVENT_LAST_ENTRY == ArrayLength(kEventTypeNames),
"nsIAccessibleEvent constants are out of sync to kEventTypeNames");
MOZ_ASSERT(nsIAccessibleEvent::EVENT_LAST_ENTRY == std::size(kEventTypeNames),
"nsIAccessibleEvent constants are out of sync to kEventTypeNames");
if (aEventType >= ArrayLength(kEventTypeNames)) {
if (aEventType >= std::size(kEventTypeNames)) {
aString.AssignLiteral("unknown");
return;
}
@ -1537,7 +1536,7 @@ bool nsAccessibilityService::Init(uint64_t aCacheDomains) {
eventListenerService->AddListenerChangeListener(this);
for (uint32_t i = 0; i < ArrayLength(sHTMLMarkupMapList); i++) {
for (uint32_t i = 0; i < std::size(sHTMLMarkupMapList); i++) {
mHTMLMarkupMap.InsertOrUpdate(sHTMLMarkupMapList[i].tag,
&sHTMLMarkupMapList[i]);
}
@ -1545,7 +1544,7 @@ bool nsAccessibilityService::Init(uint64_t aCacheDomains) {
mMathMLMarkupMap.InsertOrUpdate(info.tag, &info);
}
for (uint32_t i = 0; i < ArrayLength(sXULMarkupMapList); i++) {
for (uint32_t i = 0; i < std::size(sXULMarkupMapList); i++) {
mXULMarkupMap.InsertOrUpdate(sXULMarkupMapList[i].tag,
&sXULMarkupMapList[i]);
}
@ -1756,7 +1755,7 @@ void nsAccessibilityService::MarkupAttributes(
if (!markupMap) return;
dom::Element* el = aAcc->IsLocal() ? aAcc->AsLocal()->Elm() : nullptr;
for (uint32_t i = 0; i < ArrayLength(markupMap->attrs); i++) {
for (uint32_t i = 0; i < std::size(markupMap->attrs); i++) {
const MarkupAttrInfo* info = markupMap->attrs + i;
if (!info->name) break;

View File

@ -311,7 +311,7 @@ class nsAccessibilityService final : public mozilla::a11y::DocManager,
const mozilla::a11y::MarkupMapInfo* markupMap =
GetMarkupMapInfoFor(aSource);
if (markupMap) {
for (size_t i = 0; i < mozilla::ArrayLength(markupMap->attrs); i++) {
for (size_t i = 0; i < std::size(markupMap->attrs); i++) {
const mozilla::a11y::MarkupAttrInfo* info = markupMap->attrs + i;
if (info->name == aAtom) {
return info->value;

View File

@ -65,7 +65,7 @@ static nsStaticAtom* const kRelationAttrs[] = {
nsGkAtoms::aria_errormessage, nsGkAtoms::_for,
nsGkAtoms::control, nsGkAtoms::popovertarget};
static const uint32_t kRelationAttrsLen = ArrayLength(kRelationAttrs);
static const uint32_t kRelationAttrsLen = std::size(kRelationAttrs);
static nsStaticAtom* const kSingleElementRelationIdlAttrs[] = {
nsGkAtoms::popovertarget};

View File

@ -153,7 +153,7 @@ nsresult RootAccessible::AddEventListeners() {
if (nstarget) {
for (const char *const *e = kEventTypes, *const *e_end =
ArrayEnd(kEventTypes);
std::end(kEventTypes);
e < e_end; ++e) {
nsresult rv = nstarget->AddEventListener(NS_ConvertASCIItoUTF16(*e), this,
true, true);
@ -169,7 +169,7 @@ nsresult RootAccessible::RemoveEventListeners() {
nsCOMPtr<EventTarget> target = window ? window->GetParentTarget() : nullptr;
if (target) {
for (const char *const *e = kEventTypes, *const *e_end =
ArrayEnd(kEventTypes);
std::end(kEventTypes);
e < e_end; ++e) {
target->RemoveEventListener(NS_ConvertASCIItoUTF16(*e), this, true);
}

View File

@ -1234,7 +1234,7 @@ nsTArray<bool> RemoteAccessible::PreProcessRelations(AccAttributes* aFields) {
if (!DomainsAreActive(CacheDomain::Relations)) {
return {};
}
nsTArray<bool> updateTracker(ArrayLength(kRelationTypeAtoms));
nsTArray<bool> updateTracker(std::size(kRelationTypeAtoms));
for (auto const& data : kRelationTypeAtoms) {
if (data.mValidTag) {
// The relation we're currently processing only applies to particular
@ -1310,7 +1310,7 @@ void RemoteAccessible::PostProcessRelations(const nsTArray<bool>& aToUpdate) {
return;
}
size_t updateCount = aToUpdate.Length();
MOZ_ASSERT(updateCount == ArrayLength(kRelationTypeAtoms),
MOZ_ASSERT(updateCount == std::size(kRelationTypeAtoms),
"Did not note update status for every relation type!");
for (size_t i = 0; i < updateCount; i++) {
if (aToUpdate.ElementAt(i)) {

View File

@ -468,7 +468,7 @@ struct RoleDescrComparator {
if (subrole) {
size_t idx = 0;
if (BinarySearchIf(sRoleDescrMap, 0, ArrayLength(sRoleDescrMap),
if (BinarySearchIf(sRoleDescrMap, 0, std::size(sRoleDescrMap),
RoleDescrComparator(subrole), &idx)) {
return utils::LocalizedString(sRoleDescrMap[idx].description);
}

View File

@ -77,7 +77,7 @@ ia2Accessible::get_nRelations(long* aNRelations) {
return CO_E_OBJNOTCONNECTED;
}
for (uint32_t idx = 0; idx < ArrayLength(sRelationTypePairs); idx++) {
for (uint32_t idx = 0; idx < std::size(sRelationTypePairs); idx++) {
if (sRelationTypePairs[idx].second == IA2_RELATION_NULL) continue;
Relation rel = acc->RelationByType(sRelationTypePairs[idx].first);
@ -98,7 +98,7 @@ ia2Accessible::get_relation(long aRelationIndex,
}
long relIdx = 0;
for (uint32_t idx = 0; idx < ArrayLength(sRelationTypePairs); idx++) {
for (uint32_t idx = 0; idx < std::size(sRelationTypePairs); idx++) {
if (sRelationTypePairs[idx].second == IA2_RELATION_NULL) continue;
RelationType relationType = sRelationTypePairs[idx].first;
@ -131,7 +131,7 @@ ia2Accessible::get_relations(long aMaxRelations,
}
for (uint32_t idx = 0;
idx < ArrayLength(sRelationTypePairs) && *aNRelations < aMaxRelations;
idx < std::size(sRelationTypePairs) && *aNRelations < aMaxRelations;
idx++) {
if (sRelationTypePairs[idx].second == IA2_RELATION_NULL) continue;
@ -484,7 +484,7 @@ ia2Accessible::get_relationTargetsOfType(BSTR aType, long aMaxTargets,
*aNTargets = 0;
Maybe<RelationType> relationType;
for (uint32_t idx = 0; idx < ArrayLength(sRelationTypePairs); idx++) {
for (uint32_t idx = 0; idx < std::size(sRelationTypePairs); idx++) {
if (wcscmp(aType, sRelationTypePairs[idx].second) == 0) {
relationType.emplace(sRelationTypePairs[idx].first);
break;

View File

@ -210,7 +210,7 @@ bool LazyInstantiator::IsBlockedInjection() {
return false;
}
for (size_t index = 0, len = ArrayLength(gBlockedInprocDlls); index < len;
for (size_t index = 0, len = std::size(gBlockedInprocDlls); index < len;
++index) {
const DllBlockInfo& blockedDll = gBlockedInprocDlls[index];
HMODULE module = ::GetModuleHandleW(blockedDll.mName);
@ -247,8 +247,7 @@ bool LazyInstantiator::ShouldInstantiate(const DWORD aClientPid) {
nsAutoString leafName;
rv = clientExe->GetLeafName(leafName);
if (NS_SUCCEEDED(rv)) {
for (size_t i = 0, len = ArrayLength(gBlockedRemoteClients); i < len;
++i) {
for (size_t i = 0, len = std::size(gBlockedRemoteClients); i < len; ++i) {
if (leafName.EqualsIgnoreCase(gBlockedRemoteClients[i])) {
// If client exe is in our blocklist, do not instantiate.
return false;

View File

@ -216,7 +216,7 @@ void MsaaAccessible::FireWinEvent(Accessible* aTarget, uint32_t aEventType) {
nsIAccessibleEvent::EVENT_LAST_ENTRY,
"MSAA event map skewed");
if (aEventType == 0 || aEventType >= ArrayLength(gWinEventMap)) {
if (aEventType == 0 || aEventType >= std::size(gWinEventMap)) {
MOZ_ASSERT_UNREACHABLE("invalid event type");
return;
}

View File

@ -318,7 +318,7 @@ uiaRawElmProvider::GetRuntimeId(__RPC__deref_out_opt SAFEARRAY** aRuntimeIds) {
*aRuntimeIds = SafeArrayCreateVector(VT_I4, 0, 2);
if (!*aRuntimeIds) return E_OUTOFMEMORY;
for (LONG i = 0; i < (LONG)ArrayLength(ids); i++)
for (LONG i = 0; i < (LONG)std::size(ids); i++)
SafeArrayPutElement(*aRuntimeIds, &i, (void*)&(ids[i]));
return S_OK;

View File

@ -92,8 +92,7 @@ __attribute__((constructor)) static void SSE2Check() {
// Using write() in order to avoid jemalloc-based buffering. Ignoring return
// values, since there isn't much we could do on failure and there is no
// point in trying to recover from errors.
MOZ_UNUSED(
write(STDERR_FILENO, sSSE2Message, MOZ_ARRAY_LENGTH(sSSE2Message) - 1));
MOZ_UNUSED(write(STDERR_FILENO, sSSE2Message, std::size(sSSE2Message) - 1));
// _exit() instead of exit() to avoid running the usual "at exit" code.
_exit(255);
}

View File

@ -305,7 +305,7 @@ static bool AddWscInfo(mozilla::JSONWriter& aJson) {
const CLSID clsid = __uuidof(WSCProductList);
const IID iid = __uuidof(IWSCProductList);
for (uint32_t index = 0; index < mozilla::ArrayLength(gProvKeys); ++index) {
for (uint32_t index = 0; index < std::size(gProvKeys); ++index) {
// NB: A separate instance of IWSCProductList is needed for each distinct
// security provider type; MSDN says that we cannot reuse the same object
// and call Initialize() to pave over the previous data.
@ -368,11 +368,11 @@ static bool AddModuleInfo(const nsAutoHandle& aSnapshot,
wchar_t leaf[_MAX_FNAME] = {};
if (::_wsplitpath_s(module.szExePath, nullptr, 0, nullptr, 0, leaf,
mozilla::ArrayLength(leaf), nullptr, 0)) {
std::size(leaf), nullptr, 0)) {
return false;
}
if (_wcslwr_s(leaf, mozilla::ArrayLength(leaf))) {
if (_wcslwr_s(leaf, std::size(leaf))) {
return false;
}
@ -487,8 +487,7 @@ static bool PrepPing(const PingThreadContext& aContext, const std::wstring& aId,
tm gmTm;
if (!gmtime_s(&gmTm, &now)) {
char isoTimeBuf[32] = {};
if (strftime(isoTimeBuf, mozilla::ArrayLength(isoTimeBuf), "%FT%T.000Z",
&gmTm)) {
if (strftime(isoTimeBuf, std::size(isoTimeBuf), "%FT%T.000Z", &gmTm)) {
aJson.StringProperty("creationDate", isoTimeBuf);
}
}
@ -533,7 +532,7 @@ static bool PrepPing(const PingThreadContext& aContext, const std::wstring& aId,
WCHAR localeName[LOCALE_NAME_MAX_LENGTH] = {};
int localeNameLen =
::GetUserDefaultLocaleName(localeName, mozilla::ArrayLength(localeName));
::GetUserDefaultLocaleName(localeName, std::size(localeName));
if (localeNameLen) {
auto localeNameUtf8 = WideToUTF8(localeName, localeNameLen - 1);
if (localeNameUtf8) {
@ -647,19 +646,19 @@ static bool DoSendPing(const PingThreadContext& aContext) {
wchar_t drive[_MAX_DRIVE] = {};
wchar_t dir[_MAX_DIR] = {};
if (_wsplitpath_s(exePath.get(), drive, mozilla::ArrayLength(drive), dir,
mozilla::ArrayLength(dir), nullptr, 0, nullptr, 0)) {
if (_wsplitpath_s(exePath.get(), drive, std::size(drive), dir, std::size(dir),
nullptr, 0, nullptr, 0)) {
return false;
}
wchar_t pingSenderPath[MAX_PATH + 1] = {};
if (_wmakepath_s(pingSenderPath, mozilla::ArrayLength(pingSenderPath), drive,
dir, L"pingsender", L"exe")) {
if (_wmakepath_s(pingSenderPath, std::size(pingSenderPath), drive, dir,
L"pingsender", L"exe")) {
return false;
}
// Construct the telemetry URL
wchar_t urlBuf[mozilla::ArrayLength(kUrl) + kGuidCharLenNoBracesNoNul] = {};
wchar_t urlBuf[std::size(kUrl) + kGuidCharLenNoBracesNoNul] = {};
if (wcscpy_s(urlBuf, kUrl)) {
return false;
}
@ -672,8 +671,8 @@ static bool DoSendPing(const PingThreadContext& aContext) {
wchar_t* pingSenderArgv[] = {pingSenderPath, urlBuf,
const_cast<wchar_t*>(fileName.c_str())};
mozilla::UniquePtr<wchar_t[]> pingSenderCmdLine(mozilla::MakeCommandLine(
mozilla::ArrayLength(pingSenderArgv), pingSenderArgv));
mozilla::UniquePtr<wchar_t[]> pingSenderCmdLine(
mozilla::MakeCommandLine(std::size(pingSenderArgv), pingSenderArgv));
// Now start pingsender to handle the rest
PROCESS_INFORMATION pi;

View File

@ -109,7 +109,7 @@ static mozilla::LauncherResult<bool> IsAdminByAppCompat(
wchar_t* tokenContext = nullptr;
const wchar_t* token = wcstok_s(valueData.get(), kDelimiters, &tokenContext);
while (token) {
if (!_wcsnicmp(token, kRunAsAdmin, mozilla::ArrayLength(kRunAsAdmin))) {
if (!_wcsnicmp(token, kRunAsAdmin, std::size(kRunAsAdmin))) {
return true;
}
token = wcstok_s(nullptr, kDelimiters, &tokenContext);

View File

@ -24,7 +24,7 @@ class ProcessImagePath final {
// Initialize with an NT path string of a given process handle
explicit ProcessImagePath(const nsAutoHandle& aProcess)
: mType(PathType::eNtPath), mLastError(Ok()) {
DWORD len = mozilla::ArrayLength(mPathBuffer);
DWORD len = std::size(mPathBuffer);
if (!::QueryFullProcessImageNameW(aProcess.get(), PROCESS_NAME_NATIVE,
mPathBuffer, &len)) {
mLastError = LAUNCHER_ERROR_FROM_LAST();
@ -35,9 +35,9 @@ class ProcessImagePath final {
// Initizlize with a DOS path string of a given imagebase address
explicit ProcessImagePath(HMODULE aImageBase)
: mType(PathType::eDosPath), mLastError(Ok()) {
DWORD len = ::GetModuleFileNameW(aImageBase, mPathBuffer,
mozilla::ArrayLength(mPathBuffer));
if (!len || len == mozilla::ArrayLength(mPathBuffer)) {
DWORD len =
::GetModuleFileNameW(aImageBase, mPathBuffer, std::size(mPathBuffer));
if (!len || len == std::size(mPathBuffer)) {
mLastError = LAUNCHER_ERROR_FROM_LAST();
return;
}

View File

@ -117,10 +117,10 @@ void NativeNtBlockSet::Write(WritableBuffer& aBuffer) {
parts[1] = (entry->mVersion >> 32) & 0xFFFF;
parts[2] = (entry->mVersion >> 16) & 0xFFFF;
parts[3] = entry->mVersion & 0xFFFF;
for (size_t p = 0; p < mozilla::ArrayLength(parts); ++p) {
for (size_t p = 0; p < std::size(parts); ++p) {
_ltoa_s(parts[p], buf, sizeof(buf), 10);
aBuffer.Write(buf, strlen(buf));
if (p != mozilla::ArrayLength(parts) - 1) {
if (p != std::size(parts) - 1) {
aBuffer.Write(".", 1);
}
}

View File

@ -79,7 +79,7 @@ class TempFile final {
public:
TempFile() : mFullPath{0} {
wchar_t tempDir[MAX_PATH + 1];
DWORD len = ::GetTempPathW(ArrayLength(tempDir), tempDir);
DWORD len = ::GetTempPathW(std::size(tempDir), tempDir);
if (!len) {
return;
}
@ -537,8 +537,7 @@ class ChildProcess final {
ChildProcess(const wchar_t* aExecutable, const wchar_t* aOption)
: mProcessId(0) {
const wchar_t* childArgv[] = {aExecutable, aOption};
auto cmdLine(
mozilla::MakeCommandLine(mozilla::ArrayLength(childArgv), childArgv));
auto cmdLine(mozilla::MakeCommandLine(std::size(childArgv), childArgv));
STARTUPINFOW si = {sizeof(si)};
PROCESS_INFORMATION pi;

View File

@ -158,8 +158,8 @@ static nsReturnRef<HANDLE> CreateSelfProcess(int argc, wchar_t* argv[]) {
wchar_t* extraArgs[] = {strPid};
auto cmdLine = mozilla::MakeCommandLine(
argc, argv, mozilla::ArrayLength(extraArgs), extraArgs);
auto cmdLine =
mozilla::MakeCommandLine(argc, argv, std::size(extraArgs), extraArgs);
if (!cmdLine) {
PrintErrorMsg("MakeCommandLine failed");
return empty.out();

View File

@ -305,6 +305,11 @@ var FullScreen = {
"permissions.fullscreen.allowed"
);
let notificationExitButton = document.getElementById(
"fullscreen-exit-button"
);
notificationExitButton.addEventListener("click", this.exitDomFullScreen);
// Called when the Firefox window go into fullscreen.
addEventListener("fullscreen", this, true);
@ -400,6 +405,7 @@ var FullScreen = {
},
exitDomFullScreen() {
// Don't use `this` here. It does not reliably refer to this object.
if (document.fullscreen) {
document.exitFullscreen();
}

View File

@ -10,7 +10,6 @@
<html:div class="pointerlockfswarning-generic-text"
data-l10n-id="fullscreen-warning-no-domain"></html:div>
<html:button id="fullscreen-exit-button"
onclick="FullScreen.exitDomFullScreen();"
#ifdef XP_MACOSX
data-l10n-id="fullscreen-exit-mac-button"
#else

View File

@ -49,10 +49,11 @@ skip-if = [
["browser_fullscreen_newwindow.js"]
["browser_fullscreen_tab_preview.js"]
["browser_fullscreen_permissions_prompt.js"]
["browser_fullscreen_tab_preview.js"]
skip-if = ["os == 'linux' && os_version == '18.04' && processor == 'x86_64'"] # Bug 1924271
["browser_fullscreen_warning.js"]
support-files = ["fullscreen.html"]
skip-if = ["os == 'mac'"] # Bug 1848423

View File

@ -3192,11 +3192,11 @@ BrowserGlue.prototype = {
}
ChromeUtils.idleDispatch(
() => {
async () => {
if (!Services.startup.shuttingDown) {
let startTime = Cu.now();
try {
task.task();
await task.task();
} catch (ex) {
console.error(ex);
} finally {

View File

@ -35,6 +35,10 @@ async function isGroupHidden(tab) {
}
add_task(async function test_show_prefs() {
Services.prefs.setBoolPref(
"browser.urlbar.scotchBonnet.enableOverride",
false
);
Services.prefs.setBoolPref("browser.urlbar.quickactions.showPrefs", false);
let tab = await BrowserTestUtils.openNewForegroundTab(
@ -54,6 +58,7 @@ add_task(async function test_show_prefs() {
"The preferences are shown when pref enabled"
);
Services.prefs.clearUserPref("browser.urlbar.scotchBonnet.enableOverride");
Services.prefs.clearUserPref("browser.urlbar.quickactions.showPrefs");
await BrowserTestUtils.removeTab(tab);
});

View File

@ -91,6 +91,7 @@ class SelectableProfileServiceClass {
#asyncShutdownBlocker = null;
#initialized = false;
#groupToolkitProfile = null;
#storeID = null;
#currentProfile = null;
#everyWindowCallbackId = "SelectableProfileService";
#defaultAvatars = [
@ -101,6 +102,7 @@ class SelectableProfileServiceClass {
"shopping",
"star",
];
#initPromise = null;
static #dirSvc = null;
constructor() {
@ -111,6 +113,23 @@ class SelectableProfileServiceClass {
this.#groupToolkitProfile =
this.#profileService.currentProfile ?? this.#profileService.groupProfile;
this.#storeID = this.#groupToolkitProfile?.storeID;
if (!this.#storeID) {
this.#storeID = Services.prefs.getCharPref(
"toolkit.profiles.storeID",
""
);
if (this.#storeID) {
// This can happen if profiles.ini has been reset by a version of Firefox prior to 67 and
// the current profile is not the current default for the group. We can recover by
// attempting to find the group profile from the database.
this.#initPromise = this.restoreStoreID()
.catch(console.error)
.finally(() => (this.#initPromise = null));
}
}
}
/**
@ -167,6 +186,10 @@ class SelectableProfileServiceClass {
}
}
get storeID() {
return this.#storeID;
}
get groupToolkitProfile() {
return this.#groupToolkitProfile;
}
@ -188,7 +211,7 @@ class SelectableProfileServiceClass {
}
async maybeCreateProfilesStorePath() {
if (!this.#groupToolkitProfile || this.#groupToolkitProfile.storeID) {
if (this.storeID) {
return;
}
@ -202,6 +225,7 @@ class SelectableProfileServiceClass {
.replace("{", "")
.split("-")[0];
this.#groupToolkitProfile.storeID = storageID;
this.#storeID = storageID;
await this.#attemptFlushProfileService();
}
@ -210,22 +234,34 @@ class SelectableProfileServiceClass {
return PathUtils.join(
SelectableProfileServiceClass.PROFILE_GROUPS_DIR,
`${this.#groupToolkitProfile.storeID}.sqlite`
`${this.storeID}.sqlite`
);
}
/**
* At startup, store the nsToolkitProfile for the group.
* Get the groupDBPath from the nsToolkitProfile, and connect to it.
*
* @returns {Promise}
*/
async init() {
init() {
if (!this.#initPromise) {
this.#initPromise = this.#init().finally(
() => (this.#initPromise = null)
);
}
return this.#initPromise;
}
async #init() {
if (this.#initialized || !this.groupToolkitProfile) {
return;
}
// If the storeID doesn't exist, we don't want to create the db until we
// need to so we early return.
if (!this.groupToolkitProfile.storeID) {
if (!this.storeID) {
return;
}
@ -347,6 +383,33 @@ class SelectableProfileServiceClass {
}
}
async restoreStoreID() {
try {
await this.#init();
for (let profile of await this.getAllProfiles()) {
let groupProfile = this.#profileService.getProfileByDir(
await profile.rootDir
);
if (groupProfile) {
this.#groupToolkitProfile = groupProfile;
this.#groupToolkitProfile.storeID = this.storeID;
await this.#profileService.asyncFlush();
return;
}
}
} catch (e) {
console.error(e);
}
// If we were unable to find a matching toolkit profile then assume the
// store ID is bogus so clear it and uninit.
this.#storeID = null;
await this.uninit();
Services.prefs.clearUserPref("toolkit.profiles.storeID");
}
async handleEvent(event) {
switch (event.type) {
case "activate": {
@ -422,11 +485,12 @@ class SelectableProfileServiceClass {
* and vacuum the group DB.
*/
async deleteProfileGroup() {
if (this.getAllProfiles().length) {
if ((await this.getAllProfiles()).length) {
return;
}
this.#groupToolkitProfile.storeID = null;
this.#storeID = null;
await this.#attemptFlushProfileService();
await this.vacuumAndCloseGroupDB();
}

View File

@ -42,6 +42,18 @@ async function initSelectableProfileService() {
await SelectableProfileService.maybeSetupDataStore();
}
function getRelativeProfilePath(path) {
let relativePath = path.getRelativePath(
Services.dirsvc.get("UAppData", Ci.nsIFile)
);
if (AppConstants.platform === "win") {
relativePath = relativePath.replace("/", "\\");
}
return relativePath;
}
async function createTestProfile(profileData = {}) {
const SelectableProfileService = getSelectableProfileService();

View File

@ -0,0 +1,34 @@
/* Any copyright is dedicated to the Public Domain.
https://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
add_task(
{
skip_if: () => !AppConstants.MOZ_SELECTABLE_PROFILES,
},
async function test_recover_storeID() {
startProfileService();
Services.prefs.setCharPref("toolkit.profiles.storeID", "foobar");
const SelectableProfileService = getSelectableProfileService();
await SelectableProfileService.init();
Assert.ok(
!SelectableProfileService.initialized,
"Didn't initialize the service"
);
let profile = SelectableProfileService.currentProfile;
Assert.ok(!profile, "Should not have a current profile");
Assert.equal(
getProfileService().currentProfile.storeID,
null,
"Should not have updated the store ID on the profile"
);
Assert.ok(
!Services.prefs.prefHasUserValue("toolkit.profiles.storeID"),
"Should have cleared the storeID pref"
);
}
);

View File

@ -0,0 +1,76 @@
/* Any copyright is dedicated to the Public Domain.
https://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
const { Sqlite } = ChromeUtils.importESModule(
"resource://gre/modules/Sqlite.sys.mjs"
);
add_task(
{
skip_if: () => !AppConstants.MOZ_SELECTABLE_PROFILES,
},
async function test_recover_storeID() {
startProfileService();
Services.prefs.setCharPref("toolkit.profiles.storeID", "foobar");
// The database needs to exist already
let groupsPath = PathUtils.join(
Services.dirsvc.get("UAppData", Ci.nsIFile).path,
"Profile Groups"
);
await IOUtils.makeDirectory(groupsPath);
let dbFile = PathUtils.join(groupsPath, "foobar.sqlite");
let db = await Sqlite.openConnection({
path: dbFile,
openNotExclusive: true,
});
let path = getRelativeProfilePath(
getProfileService().currentProfile.rootDir
);
// Slightly annoying we have to replicate this...
await db.execute(`CREATE TABLE IF NOT EXISTS "Profiles" (
id INTEGER NOT NULL,
path TEXT NOT NULL UNIQUE,
name TEXT NOT NULL,
avatar TEXT NOT NULL,
themeL10nId TEXT NOT NULL,
themeFg TEXT NOT NULL,
themeBg TEXT NOT NULL,
PRIMARY KEY(id)
);`);
await db.execute(
`INSERT INTO Profiles VALUES (NULL, :path, :name, :avatar, :themeL10nId, :themeFg, :themeBg);`,
{
path,
name: "Fake Profile",
avatar: "book",
themeL10nId: "default",
themeFg: "",
themeBg: "",
}
);
await db.close();
const SelectableProfileService = getSelectableProfileService();
await SelectableProfileService.init();
Assert.ok(
SelectableProfileService.initialized,
"Did initialize the service"
);
let profile = SelectableProfileService.currentProfile;
Assert.ok(profile, "Should have a current profile");
Assert.equal(profile.name, "Fake Profile");
Assert.equal(
getProfileService().currentProfile.storeID,
"foobar",
"Should have updated the store ID on the profile"
);
}
);

View File

@ -2,6 +2,10 @@
head = "../../../../../toolkit/profile/test/xpcshell/head.js head.js"
firefox-appdir = "browser"
["test_fail_recover_storeID.js"]
["test_recover_storeID.js"]
["test_selectable_profile_launch.js"]
["test_selectable_profile_service_exists.js"]

View File

@ -164,9 +164,11 @@ skip-if = [
["browser_label_and_icon.js"]
https_first_disabled = true
skip-if = [
"os == 'mac' && os_version == '11.20' && arch == 'aarch64'", # Disabled due to bleedover with other tests when run in regular suites; passes in "failures" jobs
"os == 'win' && os_version == '11.2009' && processor == 'x86_64' && opt && msix", # Bug 1775605
"os == 'linux' && os_version == '18.04' && processor == 'x86_64' && opt", # Bug 1775605
"os == 'mac' && os_version == '10.15' && processor == 'x86_64' && opt", # Bug 1638958
"os == 'mac' && os_version == '11.20' && arch == 'aarch64'", # Disabled due to bleedover with other tests when run in regular suites; passes in "failures" jobs
"os == 'win' && os_version == '11.2009' && processor == 'x86' && opt", # Bug 1775605
"os == 'win' && os_version == '11.2009' && processor == 'x86_64' && opt", # Bug 1775605
]
["browser_movePendingTabToNewWindow.js"]

View File

@ -29,7 +29,7 @@
static bool IsWindowsLogonConnected() {
WCHAR userName[UNLEN + 1];
DWORD size = mozilla::ArrayLength(userName);
DWORD size = std::size(userName);
if (!GetUserNameW(userName, &size)) {
return false;
}

View File

@ -400,7 +400,7 @@ bool CheckBrowserUserChoiceHashes() {
const wchar_t* exts[] = {L"https", L"http", L".html", L".htm"};
for (size_t i = 0; i < ArrayLength(exts); ++i) {
for (size_t i = 0; i < std::size(exts); ++i) {
switch (CheckUserChoiceHash(exts[i], userSid.get())) {
case CheckUserChoiceHashResult::OK_V1:
break;

View File

@ -206,7 +206,7 @@ nsGNOMEShellService::IsDefaultBrowser(bool aForAllTypes,
nsAutoCString handler;
nsCOMPtr<nsIGIOMimeApp> gioApp;
for (unsigned int i = 0; i < ArrayLength(appProtocols); ++i) {
for (unsigned int i = 0; i < std::size(appProtocols); ++i) {
if (!appProtocols[i].essential) continue;
if (!IsDefaultForSchemeHelper(nsDependentCString(appProtocols[i].name),
@ -298,7 +298,7 @@ nsGNOMEShellService::SetDefaultBrowser(bool aForAllUsers) {
}
// set handler for the protocols
for (unsigned int i = 0; i < ArrayLength(appProtocols); ++i) {
for (unsigned int i = 0; i < std::size(appProtocols); ++i) {
appInfo->SetAsDefaultForURIScheme(
nsDependentCString(appProtocols[i].name));
}
@ -306,7 +306,7 @@ nsGNOMEShellService::SetDefaultBrowser(bool aForAllUsers) {
// set handler for .html and xhtml files and MIME types:
// Add mime types for html, xhtml extension and set app to just created
// appinfo.
for (unsigned int i = 0; i < ArrayLength(appTypes); ++i) {
for (unsigned int i = 0; i < std::size(appTypes); ++i) {
appInfo->SetAsDefaultForMimeType(
nsDependentCString(appTypes[i].mimeType));
appInfo->SetAsDefaultForFileExtensions(

View File

@ -1169,7 +1169,7 @@ static nsresult GetMatchingShortcut(int aCSIDL, const nsAString& aAUMID,
static_assert(MAXPATHLEN == MAX_PATH);
wchar_t storedExePath[MAX_PATH] = {};
// With no flags GetPath gets a long path
hr = link->GetPath(storedExePath, ArrayLength(storedExePath), nullptr, 0);
hr = link->GetPath(storedExePath, std::size(storedExePath), nullptr, 0);
if (FAILED(hr) || hr == S_FALSE) {
continue;
}
@ -1394,7 +1394,7 @@ static bool IsCurrentAppPinnedToTaskbarSync(const nsAString& aumid) {
static_assert(MAXPATHLEN == MAX_PATH);
wchar_t storedExePath[MAX_PATH] = {};
// With no flags GetPath gets a long path
hr = link->GetPath(storedExePath, ArrayLength(storedExePath), nullptr, 0);
hr = link->GetPath(storedExePath, std::size(storedExePath), nullptr, 0);
if (FAILED(hr) || hr == S_FALSE) {
continue;
}
@ -2579,7 +2579,7 @@ nsWindowsShellService::ClassifyShortcut(const nsAString& aPath,
{FOLDERID_UserPinned, u"\\TaskBar\\", u"Taskbar"},
{FOLDERID_UserPinned, u"\\StartMenu\\", u"StartMenu"}};
for (size_t i = 0; i < ArrayLength(folders); ++i) {
for (size_t i = 0; i < std::size(folders); ++i) {
nsAutoString knownPath;
// These flags are chosen to avoid I/O, see bug 1363398.

View File

@ -147,7 +147,11 @@
*/
addTabs(tabs) {
for (let tab of tabs) {
gBrowser.moveTabToGroup(tab, this);
let tabToMove =
this.ownerGlobal === tab.ownerGlobal
? tab
: gBrowser.adoptTab(tab, this.tabs.at(-1)._tPos + 1);
gBrowser.moveTabToGroup(tabToMove, this);
}
}

View File

@ -819,6 +819,36 @@ add_task(async function test_tabGroupContextMenuMoveTabToExistingGroup() {
await removeTabGroup(group);
});
/*
* Same as above, but for groups in different windows
*/
add_task(
async function test_tabGroupContextMenuMoveTabToExistingGroupInDifferentWindow() {
let otherWindow = await BrowserTestUtils.openNewBrowserWindow();
let otherTab = BrowserTestUtils.addTab(
otherWindow.gBrowser,
"about:blank",
{
skipAnimation: true,
}
);
let group = otherWindow.gBrowser.addTabGroup([otherTab]);
let tab = BrowserTestUtils.addTab(gBrowser, "about:blank", {
skipAnimation: true,
});
let tabGrouped = BrowserTestUtils.waitForEvent(otherWindow, "TabGrouped");
await withTabMenu(tab, async (_, moveTabToGroupItem) => {
moveTabToGroupItem.querySelector(`[tab-group-id="${group.id}"]`).click();
});
await tabGrouped;
Assert.equal(group.tabs.length, 2, "group has 2 tabs");
await BrowserTestUtils.closeWindow(otherWindow);
}
);
/*
* Tests that when groups exist, and the context menu tab has a group,
* that group does not exist in the context menu list

View File

@ -81,7 +81,13 @@ class ProviderContextualSearch extends ActionsProvider {
async fetchEngine() {
let browser =
lazy.BrowserWindowTracker.getTopWindow().gBrowser.selectedBrowser;
let hostname = browser?.currentURI.host;
let hostname;
try {
// currentURI.host will throw on pages without a host ("about:" pages).
hostname = browser.currentURI.host;
} catch (e) {
return null;
}
if (this.engines.has(hostname)) {
return this.engines.get(hostname);

View File

@ -16,7 +16,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"af": {
"pin": false,
@ -35,7 +35,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"an": {
"pin": false,
@ -54,7 +54,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"ar": {
"pin": false,
@ -73,7 +73,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"ast": {
"pin": false,
@ -92,7 +92,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"az": {
"pin": false,
@ -111,7 +111,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"be": {
"pin": false,
@ -130,7 +130,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"bg": {
"pin": false,
@ -149,7 +149,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"bn": {
"pin": false,
@ -168,7 +168,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"bo": {
"pin": false,
@ -187,7 +187,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"br": {
"pin": false,
@ -206,7 +206,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"brx": {
"pin": false,
@ -225,7 +225,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"bs": {
"pin": false,
@ -244,7 +244,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"ca": {
"pin": false,
@ -263,7 +263,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"ca-valencia": {
"pin": false,
@ -282,7 +282,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"cak": {
"pin": false,
@ -301,7 +301,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"ckb": {
"pin": false,
@ -320,7 +320,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"cs": {
"pin": false,
@ -339,7 +339,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"cy": {
"pin": false,
@ -358,7 +358,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"da": {
"pin": false,
@ -377,7 +377,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"de": {
"pin": false,
@ -396,7 +396,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"dsb": {
"pin": false,
@ -415,7 +415,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"el": {
"pin": false,
@ -434,7 +434,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"en-CA": {
"pin": false,
@ -453,7 +453,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"en-GB": {
"pin": false,
@ -472,7 +472,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"eo": {
"pin": false,
@ -491,7 +491,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"es-AR": {
"pin": false,
@ -510,7 +510,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"es-CL": {
"pin": false,
@ -529,7 +529,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"es-ES": {
"pin": false,
@ -548,7 +548,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"es-MX": {
"pin": false,
@ -567,7 +567,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"et": {
"pin": false,
@ -586,7 +586,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"eu": {
"pin": false,
@ -605,7 +605,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"fa": {
"pin": false,
@ -624,7 +624,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"ff": {
"pin": false,
@ -643,7 +643,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"fi": {
"pin": false,
@ -662,7 +662,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"fr": {
"pin": false,
@ -681,7 +681,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"fur": {
"pin": false,
@ -700,7 +700,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"fy-NL": {
"pin": false,
@ -719,7 +719,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"ga-IE": {
"pin": false,
@ -738,7 +738,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"gd": {
"pin": false,
@ -757,7 +757,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"gl": {
"pin": false,
@ -776,7 +776,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"gn": {
"pin": false,
@ -795,7 +795,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"gu-IN": {
"pin": false,
@ -814,7 +814,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"he": {
"pin": false,
@ -833,7 +833,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"hi-IN": {
"pin": false,
@ -852,7 +852,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"hr": {
"pin": false,
@ -871,7 +871,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"hsb": {
"pin": false,
@ -890,7 +890,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"hu": {
"pin": false,
@ -909,7 +909,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"hy-AM": {
"pin": false,
@ -928,7 +928,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"hye": {
"pin": false,
@ -947,7 +947,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"ia": {
"pin": false,
@ -966,7 +966,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"id": {
"pin": false,
@ -985,7 +985,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"is": {
"pin": false,
@ -1004,7 +1004,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"it": {
"pin": false,
@ -1023,7 +1023,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"ja": {
"pin": false,
@ -1040,7 +1040,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"ja-JP-mac": {
"pin": false,
@ -1048,7 +1048,7 @@
"macosx64",
"macosx64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"ka": {
"pin": false,
@ -1067,7 +1067,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"kab": {
"pin": false,
@ -1086,7 +1086,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"kk": {
"pin": false,
@ -1105,7 +1105,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"km": {
"pin": false,
@ -1124,7 +1124,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"kn": {
"pin": false,
@ -1143,7 +1143,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"ko": {
"pin": false,
@ -1162,7 +1162,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"lij": {
"pin": false,
@ -1181,7 +1181,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"lo": {
"pin": false,
@ -1200,7 +1200,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"lt": {
"pin": false,
@ -1219,7 +1219,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"ltg": {
"pin": false,
@ -1238,7 +1238,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"lv": {
"pin": false,
@ -1257,7 +1257,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"meh": {
"pin": false,
@ -1276,7 +1276,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"mk": {
"pin": false,
@ -1295,7 +1295,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"mr": {
"pin": false,
@ -1314,7 +1314,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"ms": {
"pin": false,
@ -1333,7 +1333,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"my": {
"pin": false,
@ -1352,7 +1352,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"nb-NO": {
"pin": false,
@ -1371,7 +1371,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"ne-NP": {
"pin": false,
@ -1390,7 +1390,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"nl": {
"pin": false,
@ -1409,7 +1409,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"nn-NO": {
"pin": false,
@ -1428,7 +1428,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"oc": {
"pin": false,
@ -1447,7 +1447,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"pa-IN": {
"pin": false,
@ -1466,7 +1466,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"pl": {
"pin": false,
@ -1485,7 +1485,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"pt-BR": {
"pin": false,
@ -1504,7 +1504,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"pt-PT": {
"pin": false,
@ -1523,7 +1523,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"rm": {
"pin": false,
@ -1542,7 +1542,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"ro": {
"pin": false,
@ -1561,7 +1561,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"ru": {
"pin": false,
@ -1580,7 +1580,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"sat": {
"pin": false,
@ -1599,7 +1599,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"sc": {
"pin": false,
@ -1618,7 +1618,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"scn": {
"pin": false,
@ -1637,7 +1637,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"sco": {
"pin": false,
@ -1656,7 +1656,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"si": {
"pin": false,
@ -1675,7 +1675,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"sk": {
"pin": false,
@ -1694,7 +1694,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"skr": {
"pin": false,
@ -1713,7 +1713,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"sl": {
"pin": false,
@ -1732,7 +1732,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"son": {
"pin": false,
@ -1751,7 +1751,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"sq": {
"pin": false,
@ -1770,7 +1770,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"sr": {
"pin": false,
@ -1789,7 +1789,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"sv-SE": {
"pin": false,
@ -1808,7 +1808,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"szl": {
"pin": false,
@ -1827,7 +1827,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"ta": {
"pin": false,
@ -1846,7 +1846,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"te": {
"pin": false,
@ -1865,7 +1865,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"tg": {
"pin": false,
@ -1884,7 +1884,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"th": {
"pin": false,
@ -1903,7 +1903,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"tl": {
"pin": false,
@ -1922,7 +1922,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"tr": {
"pin": false,
@ -1941,7 +1941,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"trs": {
"pin": false,
@ -1960,7 +1960,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"uk": {
"pin": false,
@ -1979,7 +1979,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"ur": {
"pin": false,
@ -1998,7 +1998,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"uz": {
"pin": false,
@ -2017,7 +2017,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"vi": {
"pin": false,
@ -2036,7 +2036,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"wo": {
"pin": false,
@ -2055,7 +2055,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"xh": {
"pin": false,
@ -2074,7 +2074,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"zh-CN": {
"pin": false,
@ -2093,7 +2093,7 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
},
"zh-TW": {
"pin": false,
@ -2112,6 +2112,6 @@
"win64-aarch64-devedition",
"win64-devedition"
],
"revision": "6a84e599d2c586a783b87fc60b5c0b03c447f6c7"
"revision": "f34a2cd6b6fa82bba820b43cba68d029b8036188"
}
}

View File

@ -372,7 +372,7 @@ nsresult BasePrincipal::ToJSON(nsACString& aJSON) {
}
nsresult BasePrincipal::ToJSON(JSONWriter& aWriter) {
static_assert(eKindMax < ArrayLength(JSONEnumKeyStrings));
static_assert(eKindMax < std::size(JSONEnumKeyStrings));
aWriter.Start(JSONWriter::CollectionStyle::SingleLineStyle);

View File

@ -361,7 +361,7 @@ class BasePrincipal : public nsJSPrincipals {
protected:
template <size_t EnumValue>
static inline constexpr const Span<const char>& JSONEnumKeyString() {
static_assert(EnumValue < ArrayLength(JSONEnumKeyStrings));
static_assert(EnumValue < std::size(JSONEnumKeyStrings));
return JSONEnumKeyStrings[EnumValue];
}
template <size_t EnumValue>

View File

@ -1213,7 +1213,7 @@ nsScriptSecurityManager::CheckLoadURIStrWithPrincipal(
// available.
uint32_t flags[] = {nsIURIFixup::FIXUP_FLAG_NONE,
nsIURIFixup::FIXUP_FLAG_FIX_SCHEME_TYPOS};
for (uint32_t i = 0; i < ArrayLength(flags); ++i) {
for (uint32_t i = 0; i < std::size(flags); ++i) {
uint32_t fixupFlags = flags[i];
if (aPrincipal->OriginAttributesRef().IsPrivateBrowsing()) {
fixupFlags |= nsIURIFixup::FIXUP_FLAG_PRIVATE_CONTEXT;

View File

@ -6,15 +6,24 @@
display: flex;
flex-direction: column;
justify-content: center;
border-bottom: 1px solid var(--theme-splitter-color);
background-color: var(--paused-background-color);
color: var(--paused-color);
font-size: 12px;
cursor: default;
min-height: 44px;
padding: 6px;
white-space: normal;
font-weight: bold;
&:not(.hidden) {
min-height: 44px;
border-bottom: 1px solid var(--theme-splitter-color);
padding: 6px;
}
/* The component is always rendered as it's an aria live region and always need to
be in the DOM for it to properly announce changes */
&.hidden {
opacity: 0;
}
}
.why-paused > div {
@ -36,18 +45,18 @@
padding-right: 4px;
}
.why-paused .message {
font-style: italic;
font-weight: 100;
.why-paused .location {
color: var(--paused-color);
padding-block: 2px;
}
.why-paused .mutationNode {
font-weight: normal;
}
.why-paused .message.warning {
color: var(--theme-graphs-full-red);
.why-paused :is(.location, .message, .mutationNode) {
font-family: var(--monospace-font-family);
font-weight: normal;
font-size: 10px;
}
.why-paused .message.error {
color: var(--paused-error-color);
font-style: normal;
}

View File

@ -25,12 +25,15 @@ import {
getCurrentThread,
getPaneCollapse,
getPauseReason as getWhy,
getVisibleSelectedFrame,
} from "../../selectors/index";
const classnames = require("resource://devtools/client/shared/classnames.js");
class WhyPaused extends PureComponent {
constructor(props) {
super(props);
this.state = { hideWhyPaused: "" };
this.state = { hideWhyPaused: true };
}
static get propTypes() {
@ -49,10 +52,10 @@ class WhyPaused extends PureComponent {
if (delay) {
setTimeout(() => {
this.setState({ hideWhyPaused: "" });
this.setState({ hideWhyPaused: true });
}, delay);
} else {
this.setState({ hideWhyPaused: "pane why-paused" });
this.setState({ hideWhyPaused: false });
}
}
@ -78,7 +81,7 @@ class WhyPaused extends PureComponent {
const summary = this.renderExceptionSummary(exception);
return div(
{
className: "message warning",
className: "message error",
},
summary
);
@ -154,16 +157,54 @@ class WhyPaused extends PureComponent {
return null;
}
renderLocation() {
const { visibleSelectedFrame } = this.props;
if (!visibleSelectedFrame || !visibleSelectedFrame.location?.source) {
return null;
}
const { location, displayName } = visibleSelectedFrame;
let pauseLocation = "";
if (visibleSelectedFrame.displayName) {
pauseLocation += `${displayName} - `;
}
pauseLocation += `${location.source.displayURL?.filename}:${location.line}:${location.column}`;
return div({ className: "location" }, pauseLocation);
}
render() {
const { endPanelCollapsed, why } = this.props;
const { fluentBundles } = this.context;
const reason = getPauseReason(why);
if (!why || !reason || endPanelCollapsed) {
return div({
className: this.state.hideWhyPaused,
});
let content = "";
if (!why || !reason) {
if (this.state.hideWhyPaused) {
content = null;
}
} else {
content = div(
null,
div(
{
className: "info icon",
},
React.createElement(AccessibleImage, {
className: "info",
})
),
div(
{
className: "pause reason",
},
React.createElement(Localized, {
id: reason,
}),
this.renderLocation(),
this.renderMessage(why)
)
);
}
return (
// We're rendering the LocalizationProvider component from here and not in an upper
// component because it does set a new context, overriding the context that we set
@ -174,30 +215,15 @@ class WhyPaused extends PureComponent {
{
bundles: fluentBundles || [],
},
// Always render the component so the live region works as expected
div(
{
className: "pane why-paused",
className: classnames("pane why-paused", {
hidden: content == null || endPanelCollapsed,
}),
"aria-live": "polite",
},
div(
null,
div(
{
className: "info icon",
},
React.createElement(AccessibleImage, {
className: "info",
})
),
div(
{
className: "pause reason",
},
React.createElement(Localized, {
id: reason,
}),
this.renderMessage(why)
)
)
content
)
)
);
@ -209,6 +235,7 @@ WhyPaused.contextTypes = { fluentBundles: PropTypes.array };
const mapStateToProps = state => ({
endPanelCollapsed: getPaneCollapse(state, "end"),
why: getWhy(state, getCurrentThread(state)),
visibleSelectedFrame: getVisibleSelectedFrame(state),
});
export default connect(mapStateToProps, {

View File

@ -5,6 +5,7 @@ exports[`WhyPaused should pause reason with message 1`] = `
bundles={Array []}
>
<div
aria-live="polite"
className="pane why-paused"
>
<div>
@ -33,9 +34,14 @@ exports[`WhyPaused should pause reason with message 1`] = `
`;
exports[`WhyPaused should show an empty div when there is no pause reason 1`] = `
<div
className=""
/>
<LocalizationProvider
bundles={Array []}
>
<div
aria-live="polite"
className="pane why-paused hidden"
/>
</LocalizationProvider>
`;
exports[`WhyPaused should show pause reason with exception details 1`] = `
@ -43,6 +49,7 @@ exports[`WhyPaused should show pause reason with exception details 1`] = `
bundles={Array []}
>
<div
aria-live="polite"
className="pane why-paused"
>
<div>
@ -60,7 +67,7 @@ exports[`WhyPaused should show pause reason with exception details 1`] = `
id="whypaused-exception"
/>
<div
className="message warning"
className="message error"
>
ReferenceError: o is not defined
</div>
@ -75,6 +82,7 @@ exports[`WhyPaused should show pause reason with exception string 1`] = `
bundles={Array []}
>
<div
aria-live="polite"
className="pane why-paused"
>
<div>
@ -92,7 +100,7 @@ exports[`WhyPaused should show pause reason with exception string 1`] = `
id="whypaused-exception"
/>
<div
className="message warning"
className="message error"
>
Not Available
</div>

View File

@ -17,30 +17,16 @@
--skip-pausing-color: var(--theme-body-color);
--theme-inline-preview-label-pause-color: var(--paused-color);
--theme-inline-preview-label-pause-background: var(--paused-background-color);
}
:root.theme-light,
:root .theme-light {
--search-overlays-semitransparent: rgba(221, 225, 228, 0.66);
--popup-shadow-color: #d0d0d0;
--theme-inline-preview-background: rgb(251, 247, 255);
--theme-inline-preview-border-color: #ebd1ff;
--theme-inline-preview-label-trace-color: #6300a6;
--theme-inline-preview-label-trace-background: rgb(244, 230, 255);
--paused-background-color: hsl(54, 100%, 92%);
--paused-color: var(--theme-body-color);
}
:root.theme-dark,
:root .theme-dark {
--search-overlays-semitransparent: rgba(42, 46, 56, 0.66);
--popup-shadow-color: #5c667b;
--theme-inline-preview-background: rgb(43, 38, 50);
--theme-inline-preview-border-color: #47326c;
--theme-inline-preview-label-trace-color: #dfccff;
--theme-inline-preview-label-trace-background: #3f2e5f;
--paused-background-color: hsl(42, 37%, 19%);
--paused-color: hsl(43, 94%, 81%);
--search-overlays-semitransparent: light-dark(rgba(221, 225, 228, 0.66), rgba(42, 46, 56, 0.66));
--popup-shadow-color: light-dark(#d0d0d0, #5c667b);
--theme-inline-preview-background: light-dark(rgb(251, 247, 255), rgb(43, 38, 50));
--theme-inline-preview-border-color: light-dark(#ebd1ff, #47326c);
--theme-inline-preview-label-trace-color: light-dark(#6300a6, #dfccff);
--theme-inline-preview-label-trace-background: light-dark(rgb(244, 230, 255), #3f2e5f);
--paused-background-color: light-dark(hsl(54, 100%, 92%), hsl(42, 37%, 19%));
--paused-color: light-dark(var(--theme-body-color), hsl(43, 94%, 81%));
--paused-error-color: light-dark(var(--red-70), var(--red-20));
}
/* Animations */

View File

@ -25,7 +25,7 @@ add_task(async function () {
let whyPaused = await waitFor(
() => dbg.win.document.querySelector(".why-paused")?.innerText
);
is(whyPaused, "Paused on breakpoint");
is(whyPaused, "Paused on breakpoint\n(global) - doc-scripts.html:21:6");
await assertPausedAtSourceAndLine(
dbg,
@ -46,7 +46,7 @@ add_task(async function () {
whyPaused = await waitFor(
() => dbg.win.document.querySelector(".why-paused")?.innerText
);
is(whyPaused, "Paused on debugger statement");
is(whyPaused, "Paused on debugger statement\n:2:8");
await resume(dbg);

View File

@ -39,7 +39,7 @@ add_task(async function () {
let whyPaused = dbg.win.document.querySelector(".why-paused").innerText;
is(
whyPaused,
"Error with conditional breakpoint\nexpected expression, got end of script"
"Error with conditional breakpoint\nfoo - simple2.js:5:2\nexpected expression, got end of script"
);
await resume(dbg);
assertNotPaused(dbg);
@ -54,7 +54,7 @@ add_task(async function () {
whyPaused = dbg.win.document.querySelector(".why-paused").innerText;
is(
whyPaused,
"Error with conditional breakpoint\nexpected expression, got end of script"
"Error with conditional breakpoint\nfoo - simple2.js:5:2\nexpected expression, got end of script"
);
await resume(dbg);

View File

@ -96,7 +96,7 @@ add_task(async function () {
);
is(
whyPaused,
`Paused on DOM mutation\nDOM Mutation: 'attributeModified'\nbody`
`Paused on DOM mutation\nchangeAttribute - dom-mutation.original.js:3:16\nDOM Mutation: 'attributeModified'\nbody`
);
await resume(dbg);
@ -125,7 +125,7 @@ add_task(async function () {
);
is(
whyPaused,
`Paused on DOM mutation\nDOM Mutation: 'subtreeModified'\nbodyAdded:div#dynamic`
`Paused on DOM mutation\naddDivToBody - dom-mutation.js:13:16\nDOM Mutation: 'subtreeModified'\nbodyAdded:div#dynamic`
);
await resume(dbg);
@ -140,7 +140,7 @@ add_task(async function () {
);
is(
whyPaused,
`Paused on DOM mutation\nDOM Mutation: 'subtreeModified'\nbodyRemoved:div#dynamic`
`Paused on DOM mutation\nremoveDivInBody - dom-mutation.js:17:42\nDOM Mutation: 'subtreeModified'\nbodyRemoved:div#dynamic`
);
await resume(dbg);

View File

@ -28,7 +28,7 @@ add_task(async function () {
);
is(
whyPaused,
`Paused on event breakpoint\nDOM 'click' event`,
`Paused on event breakpoint\nclickTargetClicked - event-breakpoints.js:12:2\nDOM 'click' event`,
"whyPaused does state that the debugger is paused as a result of a click event breakpoint"
);
await resume(dbg);

View File

@ -22,13 +22,13 @@ add_task(async function () {
// expression, which can break synthesizeMouseAtCenter. So here we wait for the
// whyPaused element to be displayed then hidden before testing the highlight feature.
const onWhyPausedDisplayed = waitUntil(() =>
dbg.win.document.querySelector(".why-paused")
dbg.win.document.querySelector(".why-paused:not(.hidden)")
);
await addExpression(dbg, "window.document.querySelector('button')");
// TODO: Remove when Bug 1562165 lands.
await onWhyPausedDisplayed;
// TODO: Remove when Bug 1562165 lands.
await waitUntil(() => !dbg.win.document.querySelector(".why-paused"));
await waitUntil(() => dbg.win.document.querySelector(".why-paused.hidden"));
info(
"Check that hovering over DOM element highlights the node in content panel"

View File

@ -35,7 +35,10 @@ add_task(async function () {
const whyPaused = await waitFor(
() => dbg.win.document.querySelector(".why-paused")?.innerText
);
is(whyPaused, `Paused on exception\nunreachable`);
is(
whyPaused,
`Paused on exception\nuncaughtException - exceptions.js:2:2\nunreachable`
);
await resume(dbg);

View File

@ -30,7 +30,7 @@ add_task(async function test() {
const whyPaused = await waitFor(
() => dbg.win.document.querySelector(".why-paused")?.innerText
);
is(whyPaused, `Paused while stepping`);
is(whyPaused, `Paused while stepping\ndebugStatement - bundle.js:52412:10`);
await stepIn(dbg);
await stepIn(dbg);

View File

@ -33,7 +33,10 @@ add_task(async function () {
const whyPaused = await waitFor(
() => dbg.win.document.querySelector(".why-paused")?.innerText
);
is(whyPaused, `Paused on XMLHttpRequest`);
is(
whyPaused,
`Paused on XMLHttpRequest\n(global) - doc-early-xhr.html:10:11`
);
await resume(dbg);

View File

@ -8,7 +8,7 @@ The JavaScript sources executed by the browser are often transformed in some way
- JavaScript running in a page is often machine-generated, as when compiled from a language like `CoffeeScript <https://coffeescript.org/>`_ or `TypeScript <https://www.typescriptlang.org/>`_
In these situations, it's much easier to debug the original source, rather than the source in the transformed state that the browser has downloaded. A `source map <https://www.html5rocks.com/en/tutorials/developertools/sourcemaps/>`_ is a file that maps from the transformed source to the original source, enabling the browser to reconstruct the original source and present the reconstructed original in the debugger.
In these situations, it's much easier to debug the original source, rather than the source in the transformed state that the browser has downloaded. A `source map <https://web.dev/articles/source-maps>`_ is a file that maps from the transformed source to the original source, enabling the browser to reconstruct the original source and present the reconstructed original in the debugger.
To enable the debugger to work with a source map, you must:

View File

@ -122,28 +122,76 @@ redirects:
tools/lint/coding-style: code-quality/coding-style
tools/static-analysis/index.html: code-quality/static-analysis.html
fatal warnings:
- "WARNING: '([^']*)' reference target not found:((?!.rst).)*$"
- "WARNING: Include file '([^']*)' not found or reading it failed"
- "WARNING: Non-consecutive header level"
- "WARNING: Document headings start at"
- "WARNING: Parsing of expression failed"
- "WARNING: Title underline too short"
# A regexp of errors we currently allow so that we can fail on new errors,
# but resolve these at a later date. Please do not add new items to this list
# unless they are part of the existing known issues.
allowed_errors:
# Bug 1915552 - Various python errors around unexpected indentation.
- "mozbuild\\.vendor\\.moz_yaml\\.VALID_SOURCE_HOSTS.* ERROR: Unexpected indentation"
- "python/mozbuild/mozbuild/frontend/context\\.py.* ERROR: Unexpected indentation"
- "python/mozbuild/mozbuild/backend/configenvironment\\.py.* ERROR: Unexpected indentation"
- "python/mozbuild/mozbuild/vendor/rewrite_mozbuild\\.py.* ERROR: Unexpected indentation"
- "python/mozbuild/mozpack/errors\\.py.* ERROR: Unexpected indentation"
- "python/mozbuild/mozpack/mozjar\\.py.* ERROR: Unexpected indentation"
# Bug 1915274 - General issues in nss docs.
- "security/nss/releases/nss_3_90\\.rst.* ERROR: Content block expected for the \"container\" directive"
- "security/nss/releases/nss_3_94\\.rst.* ERROR: Unknown target name:"
- "security/nss/getting_started\\.rst.* CRITICAL: Unexpected section title"
max_num_warnings: 782
# Please do not add more exceptions to these warnings. Generally they should be
# fixable. If you need help please ask in the firefox-source-docs channel on Matrix.
allowed_warnings:
# General warnings that need consideration/fixing.
- "WARNING: document isn't included in any toctree"
- "WARNING: duplicate label"
- "WARNING: local id not found in doc"
- "WARNING: 'myst' cross-reference target not found"
- "WARNING: Lexing literal_block"
- "WARNING: dot command 'dot' cannot be run \\(needed for graphviz output\\)"
# Specific warnings allowed when the allow list was created.
- "accessible/HCMMediaQueries\\.md:.*: WARNING: Lexing literal_block"
- "bug-pipeline\\.rst:.*: WARNING: Duplicate explicit target name"
- "devtools-user/web_console/remoting/index\\.rst:.*: WARNING: Duplicate explicit target name"
- "dom/navigation/BrowsingContext\\.rst:.*: WARNING: Duplicate explicit target name"
- "ipc/ipdl\\.rst:.*: WARNING: Duplicate explicit target name"
- "ipc/processes\\.rst:.*: WARNING: Duplicate explicit target name"
- "js/Debugger/Debugger\\.md:.*: WARNING: Duplicate reference definition"
- "l10n/migrations/localizations\\.rst:.* ERROR: Anonymous hyperlink mismatch"
- "mobile/android/geckoview/contributor/geckoview-architecture\\.rst:.*: WARNING: Duplicate explicit target name"
- "networking/http/prioritization\\.md:.*: ERROR: At least one body element must separate transitions"
- "networking/http/prioritization\\.md:.*: ERROR: Document may not end with a transition"
- "overview/index\\.rst:.*: WARNING: toctree contains reference to nonexisting document 'mobile/android/overview'"
- "testing/automated-testing/manifest-sandbox\\.rst:.*: WARNING: download file not readable"
- "UITour-lib.Mozilla.UITour.* WARNING: duplicate class description of Mozilla.UITour"
- "mobile/android/shared/android/device_testing\\.md:.*: WARNING: Pygments lexer name"
- "widget/windows/windows-pointing-device/index.rst:229: WARNING: image file not readable"
# Unknown document warnings
- "devtools-user/3d_view/index\\.rst:.*: WARNING: unknown document"
- "devtools-user/debugger-api/index\\.rst:.*: WARNING: unknown document"
- "devtools-user/memory/aggregate_view/index\\.rst:.*: WARNING: unknown document"
- "devtools-user/migrating_from_firebug/index\\.rst:.*: WARNING: unknown document"
- "devtools-user/network_monitor/index\\.rst:.*: WARNING: unknown document"
- "devtools-user/tips/index\\.rst:.*: WARNING: unknown document"
- "devtools-user/tools_toolbox/index\\.rst:.*: WARNING: unknown document"
# Undefined label warnings.
- "code-quality/.*\\.rst:.*: WARNING: undefined label"
- "contributing/.*\\.rst:.*: WARNING: undefined label"
- "crash-reporting/index\\.rst:.*: WARNING: undefined label"
- "dom/navigation/nav_replace\\.rst:.*: WARNING: undefined label"
- "devtools-user/page_inspector/how_to/work_with_animations/index.rst:.*: WARNING: undefined label"
- "js/build\\.rst:.*: WARNING: undefined label"
- "layout/Reftest\\.rst:.*: WARNING: undefined label"
- "mots/index.rst:.*: WARNING: undefined label"
- "nspr/.* WARNING: undefined label"
- "overview/gecko\\.rst:.*: WARNING: undefined label"
- "setup/configuring_build_options\\.rst:.*: WARNING: undefined label"
- "setup/windows_build\\.rst:.*: WARNING: undefined label"
- "taskcluster/release-promotion-action\\.rst:.*: WARNING: undefined label"
- "toolkit/components/messaging-system/docs/index\\.rst:.*: WARNING: undefined label"
- "toolkit/components/telemetry/collection/events\\.rst:.*: WARNING: undefined label"
- "toolkit/mozapps/extensions/addon-manager/AMRemoteSettings-overview\\.rst:.*: WARNING: undefined label"
- "tools/fuzzing/fuzzing_interface\\.rst:.*: WARNING: undefined label"
- "tools/try/selectors/chooser\\.rst:.*: WARNING: undefined label"
- "tools/try/tasks\\.rst:.*: WARNING: undefined label"
# Bug 1915274 - Clean up documentation warnings in NSS
- "security/nss/.* WARNING: undefined label"
# Various python issues
- "\\.py:.*: ERROR: Unexpected indentation."
- "\\.py:.* WARNING: duplicate object description"
- "docstring of mozbuild.vendor.moz_yaml.VALID_SOURCE_HOSTS:.*: ERROR: Unexpected indentation."
- "docstring of mozbuild.vendor.moz_yaml.VALID_SOURCE_HOSTS:.*: WARNING: Inline emphasis start-string without end-string"
- "process_define_file:.*: WARNING: Inline emphasis start-string without end-string"
- "docstring of marionette_driver.*: WARNING: Field list ends without a blank line"
- "missing attribute .* in object mozprocess.ProcessHandlerMixin"
- "WARNING: autodoc: failed to import module"
- "WARNING: invalid signature for automodule \\('mozbuild.action.xpidl-process'\\)"
- "WARNING: don't know which module to import for autodocumenting"
# This file has various warnings that need investigation.
- "python/mozbuild/mozbuild/frontend/context\\.py"
# mozbuild.sphinx extension warnings.
- "WARNING: the mozbuild.sphinx extension does not declare"
- "WARNING: doing serial read"

View File

@ -212,7 +212,7 @@ static const RedirEntry kRedirMap[] = {
nsIAboutModule::URI_MUST_LOAD_IN_CHILD},
{"crashgpu", "about:blank", nsIAboutModule::HIDE_FROM_ABOUTABOUT},
{"crashextensions", "about:blank", nsIAboutModule::HIDE_FROM_ABOUTABOUT}};
static const int kRedirTotal = mozilla::ArrayLength(kRedirMap);
static const int kRedirTotal = std::size(kRedirMap);
NS_IMETHODIMP
nsAboutRedirector::NewChannel(nsIURI* aURI, nsILoadInfo* aLoadInfo,

View File

@ -782,9 +782,8 @@ CCRunnerStep CCGCScheduler::AdvanceCCRunner(TimeStamp aDeadline, TimeStamp aNow,
{false, false}, /* CCRunnerState::StartCycleCollection */
{false, false}, /* CCRunnerState::CycleCollecting */
{false, false}}; /* CCRunnerState::Canceled */
static_assert(
ArrayLength(stateDescriptors) == size_t(CCRunnerState::NumStates),
"need one state descriptor per state");
static_assert(std::size(stateDescriptors) == size_t(CCRunnerState::NumStates),
"need one state descriptor per state");
const StateDescriptor& desc = stateDescriptors[int(mCCRunnerState)];
// Make sure we initialized the state machine.

View File

@ -99,7 +99,7 @@ static void NSResultToNameAndMessage(nsresult aNSResult, nsCString& aName,
aName.Truncate();
aMessage.Truncate();
*aCode = 0;
for (uint32_t idx = 0; idx < ArrayLength(sDOMErrorMsgMap); idx++) {
for (uint32_t idx = 0; idx < std::size(sDOMErrorMsgMap); idx++) {
if (aNSResult == sDOMErrorMsgMap[idx].mNSResult) {
aName.Rebind(sDOMErrorMsgMap[idx].mName,
strlen(sDOMErrorMsgMap[idx].mName));
@ -355,7 +355,7 @@ already_AddRefed<DOMException> DOMException::Constructor(
if (aName.WasPassed()) {
CopyUTF16toUTF8(aName.Value(), name);
for (uint32_t idx = 0; idx < ArrayLength(sDOMErrorMsgMap); idx++) {
for (uint32_t idx = 0; idx < std::size(sDOMErrorMsgMap); idx++) {
if (name.EqualsASCII(sDOMErrorMsgMap[idx].mName)) {
exceptionResult = sDOMErrorMsgMap[idx].mNSResult;
exceptionCode = sDOMErrorMsgMap[idx].mCode;

View File

@ -2533,7 +2533,7 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(Document)
static const char* kNSURIs[] = {"([none])", "(xmlns)", "(xml)",
"(xhtml)", "(XLink)", "(XSLT)",
"(MathML)", "(RDF)", "(XUL)"};
if (nsid < ArrayLength(kNSURIs)) {
if (nsid < std::size(kNSURIs)) {
SprintfLiteral(name, "Document %s %s %s", loadedAsData.get(),
kNSURIs[nsid], uri.get());
} else {

View File

@ -1819,13 +1819,13 @@ static inline bool IsVoidTag(nsAtom* aTag) {
static bool sInitialized = false;
if (!sInitialized) {
sInitialized = true;
for (uint32_t i = 0; i < ArrayLength(voidElements); ++i) {
for (uint32_t i = 0; i < std::size(voidElements); ++i) {
sFilter.add(voidElements[i]);
}
}
if (sFilter.mightContain(aTag)) {
for (uint32_t i = 0; i < ArrayLength(voidElements); ++i) {
for (uint32_t i = 0; i < std::size(voidElements); ++i) {
if (aTag == voidElements[i]) {
return true;
}

View File

@ -1231,7 +1231,7 @@ class MOZ_RAII AutoHideSelectionChanges final {
constexpr bool IsValidRawSelectionType(RawSelectionType aRawSelectionType) {
return aRawSelectionType >= nsISelectionController::SELECTION_NONE &&
aRawSelectionType <= nsISelectionController::SELECTION_URLSTRIKEOUT;
aRawSelectionType <= nsISelectionController::SELECTION_TARGET_TEXT;
}
constexpr SelectionType ToSelectionType(RawSelectionType aRawSelectionType) {

View File

@ -1022,13 +1022,13 @@ bool nsContentUtils::InitializeEventTable() {
{nullptr}};
sAtomEventTable =
new nsTHashMap<RefPtr<nsAtom>, EventNameMapping>(ArrayLength(eventArray));
sStringEventTable = new nsTHashMap<nsStringHashKey, EventNameMapping>(
ArrayLength(eventArray));
new nsTHashMap<RefPtr<nsAtom>, EventNameMapping>(std::size(eventArray));
sStringEventTable =
new nsTHashMap<nsStringHashKey, EventNameMapping>(std::size(eventArray));
sUserDefinedEvents = new nsTArray<RefPtr<nsAtom>>(64);
// Subtract one from the length because of the trailing null
for (uint32_t i = 0; i < ArrayLength(eventArray) - 1; ++i) {
for (uint32_t i = 0; i < std::size(eventArray) - 1; ++i) {
MOZ_ASSERT(!sAtomEventTable->Contains(eventArray[i].mAtom),
"Double-defining event name; fix your EventNameList.h");
sAtomEventTable->InsertOrUpdate(eventArray[i].mAtom, eventArray[i]);
@ -1053,7 +1053,7 @@ void nsContentUtils::InitializeTouchEventTable() {
#undef EVENT
{nullptr}};
// Subtract one from the length because of the trailing null
for (uint32_t i = 0; i < ArrayLength(touchEventArray) - 1; ++i) {
for (uint32_t i = 0; i < std::size(touchEventArray) - 1; ++i) {
sAtomEventTable->InsertOrUpdate(touchEventArray[i].mAtom,
touchEventArray[i]);
sStringEventTable->InsertOrUpdate(
@ -6149,7 +6149,7 @@ const nsDependentString nsContentUtils::GetLocalizedEllipsis() {
nsAutoString tmp;
Preferences::GetLocalizedString("intl.ellipsis", tmp);
uint32_t len =
std::min(uint32_t(tmp.Length()), uint32_t(ArrayLength(sBuf) - 1));
std::min(uint32_t(tmp.Length()), uint32_t(std::size(sBuf) - 1));
CopyUnicodeTo(tmp, 0, sBuf, len);
}
if (!sBuf[0]) sBuf[0] = char16_t(0x2026);
@ -9455,8 +9455,8 @@ static void AppendEncodedCharacters(const nsTextFragment* aText,
// eg < in it. We subtract 1 for the null terminator, then 1 more for the
// existing character that will be replaced.
constexpr uint32_t maxCharExtraSpace =
std::max({ArrayLength("&lt;"), ArrayLength("&gt;"),
ArrayLength("&amp;"), ArrayLength("&nbsp;")}) -
std::max({std::size("&lt;"), std::size("&gt;"), std::size("&amp;"),
std::size("&nbsp;")}) -
2;
static_assert(maxCharExtraSpace < 100, "Possible underflow");
CheckedInt<uint32_t> maxExtraSpace =
@ -9496,8 +9496,7 @@ static CheckedInt<uint32_t> ExtraSpaceNeededForAttrEncoding(
// & in it. We subtract 1 for the null terminator, then 1 more for the
// existing character that will be replaced.
constexpr uint32_t maxCharExtraSpace =
std::max({ArrayLength("&quot;"), ArrayLength("&amp;"),
ArrayLength("&nbsp;")}) -
std::max({std::size("&quot;"), std::size("&amp;"), std::size("&nbsp;")}) -
2;
static_assert(maxCharExtraSpace < 100, "Possible underflow");
return CheckedInt<uint32_t>(numEncodedChars) * maxCharExtraSpace;

View File

@ -3136,7 +3136,7 @@ bool nsGlobalWindowInner::ResolveComponentsShim(
// Define a bunch of shims from the Ci.nsIDOMFoo to window.Foo for DOM
// interfaces with constants.
for (uint32_t i = 0; i < ArrayLength(kInterfaceShimMap); ++i) {
for (uint32_t i = 0; i < std::size(kInterfaceShimMap); ++i) {
// Grab the names from the table.
const char* geckoName = kInterfaceShimMap[i].geckoName;
const char* domName = kInterfaceShimMap[i].domName;

View File

@ -910,11 +910,11 @@ static const char* NodeTypeAsString(nsINode* aNode) {
"a DocumentFragment",
"a Notation",
};
static_assert(ArrayLength(NodeTypeStrings) == nsINode::MAX_NODE_TYPE + 1,
static_assert(std::size(NodeTypeStrings) == nsINode::MAX_NODE_TYPE + 1,
"Max node type out of range for our array");
uint16_t nodeType = aNode->NodeType();
MOZ_RELEASE_ASSERT(nodeType < ArrayLength(NodeTypeStrings),
MOZ_RELEASE_ASSERT(nodeType < std::size(NodeTypeStrings),
"Uknown out-of-range node type");
return NodeTypeStrings[nodeType];
}

View File

@ -43,7 +43,7 @@ nsPIDOMWindowInner* nsMimeTypeArray::GetParentObject() const {
}
nsMimeType* nsMimeTypeArray::IndexedGetter(uint32_t aIndex, bool& aFound) {
if (!ForceNoPlugins() && aIndex < ArrayLength(mMimeTypes)) {
if (!ForceNoPlugins() && aIndex < std::size(mMimeTypes)) {
aFound = true;
return mMimeTypes[aIndex];
}

View File

@ -35,7 +35,7 @@ class nsMimeTypeArray final : public nsISupports, public nsWrapperCache {
JS::Handle<JSObject*> aGivenProto) override;
// MimeTypeArray WebIDL methods
uint32_t Length() { return ForceNoPlugins() ? 0 : ArrayLength(mMimeTypes); }
uint32_t Length() { return ForceNoPlugins() ? 0 : std::size(mMimeTypes); }
nsMimeType* Item(uint32_t aIndex) {
bool unused;

View File

@ -167,7 +167,7 @@ const char* nsNameSpaceManager::GetNameSpaceDisplayName(uint32_t aNameSpaceID) {
static const char* kNSURIs[] = {"([none])", "(xmlns)", "(xml)", "(xhtml)",
"(XLink)", "(XSLT)", "(MathML)", "(RDF)",
"(XUL)", "(SVG)"};
if (aNameSpaceID < ArrayLength(kNSURIs)) {
if (aNameSpaceID < std::size(kNSURIs)) {
return kNSURIs[aNameSpaceID];
}
return "";

View File

@ -36,12 +36,12 @@ nsPluginArray::nsPluginArray(nsPIDOMWindowInner* aWindow) : mWindow(aWindow) {
mPlugins[0] = MakeRefPtr<nsPluginElement>(this, aWindow, kMainPluginName);
mozilla::Array<RefPtr<nsMimeType>, 2> mimeTypes;
for (uint32_t i = 0; i < ArrayLength(kMimeTypeNames); ++i) {
for (uint32_t i = 0; i < std::size(kMimeTypeNames); ++i) {
mimeTypes[i] = MakeRefPtr<nsMimeType>(mPlugins[0], kMimeTypeNames[i]);
}
mMimeTypeArray = MakeRefPtr<nsMimeTypeArray>(aWindow, mimeTypes);
for (uint32_t i = 0; i < ArrayLength(kExtraPluginNames); ++i) {
for (uint32_t i = 0; i < std::size(kExtraPluginNames); ++i) {
mPlugins[i + 1] =
MakeRefPtr<nsPluginElement>(this, aWindow, kExtraPluginNames[i]);
}
@ -60,7 +60,7 @@ JSObject* nsPluginArray::WrapObject(JSContext* aCx,
}
nsPluginElement* nsPluginArray::IndexedGetter(uint32_t aIndex, bool& aFound) {
if (!ForceNoPlugins() && aIndex < ArrayLength(mPlugins)) {
if (!ForceNoPlugins() && aIndex < std::size(mPlugins)) {
aFound = true;
return mPlugins[aIndex];
}

View File

@ -39,7 +39,7 @@ class nsPluginArray final : public nsSupportsWeakReference,
nsMimeTypeArray* MimeTypeArray() { return mMimeTypeArray; }
// PluginArray WebIDL methods
uint32_t Length() { return ForceNoPlugins() ? 0 : ArrayLength(mPlugins); }
uint32_t Length() { return ForceNoPlugins() ? 0 : std::size(mPlugins); }
nsPluginElement* Item(uint32_t aIndex) {
bool unused;

View File

@ -2352,61 +2352,61 @@ void nsTreeSanitizer::LogMessage(const char* aMessage, Document* aDoc,
void nsTreeSanitizer::InitializeStatics() {
MOZ_ASSERT(!sElementsHTML, "Initializing a second time.");
sElementsHTML = new AtomsTable(ArrayLength(kElementsHTML));
sElementsHTML = new AtomsTable(std::size(kElementsHTML));
for (uint32_t i = 0; kElementsHTML[i]; i++) {
sElementsHTML->Insert(kElementsHTML[i]);
}
sAttributesHTML = new AtomsTable(ArrayLength(kAttributesHTML));
sAttributesHTML = new AtomsTable(std::size(kAttributesHTML));
for (uint32_t i = 0; kAttributesHTML[i]; i++) {
sAttributesHTML->Insert(kAttributesHTML[i]);
}
sPresAttributesHTML = new AtomsTable(ArrayLength(kPresAttributesHTML));
sPresAttributesHTML = new AtomsTable(std::size(kPresAttributesHTML));
for (uint32_t i = 0; kPresAttributesHTML[i]; i++) {
sPresAttributesHTML->Insert(kPresAttributesHTML[i]);
}
sElementsSVG = new AtomsTable(ArrayLength(kElementsSVG));
sElementsSVG = new AtomsTable(std::size(kElementsSVG));
for (uint32_t i = 0; kElementsSVG[i]; i++) {
sElementsSVG->Insert(kElementsSVG[i]);
}
sAttributesSVG = new AtomsTable(ArrayLength(kAttributesSVG));
sAttributesSVG = new AtomsTable(std::size(kAttributesSVG));
for (uint32_t i = 0; kAttributesSVG[i]; i++) {
sAttributesSVG->Insert(kAttributesSVG[i]);
}
sElementsMathML = new AtomsTable(ArrayLength(kElementsMathML));
sElementsMathML = new AtomsTable(std::size(kElementsMathML));
for (uint32_t i = 0; kElementsMathML[i]; i++) {
sElementsMathML->Insert(kElementsMathML[i]);
}
sAttributesMathML = new AtomsTable(ArrayLength(kAttributesMathML));
sAttributesMathML = new AtomsTable(std::size(kAttributesMathML));
for (uint32_t i = 0; kAttributesMathML[i]; i++) {
sAttributesMathML->Insert(kAttributesMathML[i]);
}
sBaselineAttributeAllowlist =
new AtomsTable(ArrayLength(kBaselineAttributeAllowlist));
new AtomsTable(std::size(kBaselineAttributeAllowlist));
for (const auto* atom : kBaselineAttributeAllowlist) {
sBaselineAttributeAllowlist->Insert(atom);
}
sBaselineElementAllowlist =
new AtomsTable(ArrayLength(kBaselineElementAllowlist));
new AtomsTable(std::size(kBaselineElementAllowlist));
for (const auto* atom : kBaselineElementAllowlist) {
sBaselineElementAllowlist->Insert(atom);
}
sDefaultConfigurationAttributeAllowlist =
new AtomsTable(ArrayLength(kDefaultConfigurationAttributeAllowlist));
new AtomsTable(std::size(kDefaultConfigurationAttributeAllowlist));
for (const auto* atom : kDefaultConfigurationAttributeAllowlist) {
sDefaultConfigurationAttributeAllowlist->Insert(atom);
}
sDefaultConfigurationElementAllowlist =
new AtomsTable(ArrayLength(kDefaultConfigurationElementAllowlist));
new AtomsTable(std::size(kDefaultConfigurationElementAllowlist));
for (const auto* atom : kDefaultConfigurationElementAllowlist) {
sDefaultConfigurationElementAllowlist->Insert(atom);
}

View File

@ -729,7 +729,7 @@ const char* IncrementUseCounter(UseCounter aUseCounter, bool aIsPage) {
f.write("\n".join(static_asserts))
f.write(
"""\
MOZ_ASSERT(size_t(aUseCounter) < ArrayLength(kEntries));
MOZ_ASSERT(size_t(aUseCounter) < std::size(kEntries));
const auto& entry = kEntries[size_t(aUseCounter)];
(aIsPage ? entry.page_metric : entry.doc_metric).Add();
return entry.name;
@ -771,7 +771,7 @@ const char* IncrementWorkerUseCounter(UseCounterWorker aUseCounter, WorkerKind a
f.write("\n".join(static_asserts))
f.write(
"""\
MOZ_ASSERT(size_t(aUseCounter) < ArrayLength(kEntries));
MOZ_ASSERT(size_t(aUseCounter) < std::size(kEntries));
const auto& entry = kEntries[size_t(aUseCounter)];
switch (aKind) {
case WorkerKind::WorkerKindDedicated:

View File

@ -130,7 +130,7 @@ static const JSErrorFormatString ErrorFormatString[] = {
static const JSErrorFormatString* GetErrorMessage(void* aUserRef,
const unsigned aErrorNumber) {
MOZ_ASSERT(aErrorNumber < ArrayLength(ErrorFormatString));
MOZ_ASSERT(aErrorNumber < std::size(ErrorFormatString));
return &ErrorFormatString[aErrorNumber];
}

View File

@ -482,7 +482,7 @@ class ProtoAndIfaceCache {
JS::Heap<JSObject*>& EntrySlotMustExist(size_t i) { return (*this)[i]; }
void Trace(JSTracer* aTracer) {
for (size_t i = 0; i < ArrayLength(*this); ++i) {
for (size_t i = 0; i < std::size(*this); ++i) {
JS::TraceEdge(aTracer, &(*this)[i], "protoAndIfaceCache[i]");
}
}
@ -497,7 +497,7 @@ class ProtoAndIfaceCache {
PageTableCache() { memset(mPages.begin(), 0, sizeof(mPages)); }
~PageTableCache() {
for (size_t i = 0; i < ArrayLength(mPages); ++i) {
for (size_t i = 0; i < std::size(mPages); ++i) {
delete mPages[i];
}
}
@ -539,10 +539,10 @@ class ProtoAndIfaceCache {
}
void Trace(JSTracer* trc) {
for (size_t i = 0; i < ArrayLength(mPages); ++i) {
for (size_t i = 0; i < std::size(mPages); ++i) {
Page* p = mPages[i];
if (p) {
for (size_t j = 0; j < ArrayLength(*p); ++j) {
for (size_t j = 0; j < std::size(*p); ++j) {
JS::TraceEdge(trc, &(*p)[j], "protoAndIfaceCache[i]");
}
}
@ -551,7 +551,7 @@ class ProtoAndIfaceCache {
size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) {
size_t n = aMallocSizeOf(this);
for (size_t i = 0; i < ArrayLength(mPages); ++i) {
for (size_t i = 0; i < std::size(mPages); ++i) {
n += aMallocSizeOf(mPages[i]);
}
return n;
@ -1495,9 +1495,8 @@ inline Maybe<Enum> StringToEnum(const StringT& aString) {
template <typename Enum>
inline constexpr const nsLiteralCString& GetEnumString(Enum stringId) {
MOZ_RELEASE_ASSERT(
static_cast<size_t>(stringId) <
mozilla::ArrayLength(binding_detail::EnumStrings<Enum>::Values));
MOZ_RELEASE_ASSERT(static_cast<size_t>(stringId) <
std::size(binding_detail::EnumStrings<Enum>::Values));
return binding_detail::EnumStrings<Enum>::Values[static_cast<size_t>(
stringId)];
}

View File

@ -6893,7 +6893,7 @@ def getJSToNativeConversionInfo(
defaultCode = fill(
"""
static const char data[] = { ${data} };
$${declName} = JS_NewStringCopyN(cx, data, ArrayLength(data) - 1);
$${declName} = JS_NewStringCopyN(cx, data, std::size(data) - 1);
if (!$${declName}) {
$*{exceptionCode}
}
@ -12434,7 +12434,7 @@ class CGEnumToJSValue(CGAbstractMethod):
def definition_body(self):
return fill(
"""
MOZ_ASSERT(uint32_t(aArgument) < ArrayLength(${strings}));
MOZ_ASSERT(uint32_t(aArgument) < std::size(${strings}));
JSString* resultStr =
JS_NewStringCopyN(aCx, ${strings}[uint32_t(aArgument)].BeginReading(),
${strings}[uint32_t(aArgument)].Length());
@ -12528,7 +12528,7 @@ class CGMaxContiguousEnumValue(CGThing):
static_assert(static_cast<${ty}>(dom::${name}::${minValue}) == 0,
"We rely on this in ContiguousEnumValues");
static_assert(mozilla::ArrayLength(dom::binding_detail::EnumStrings<dom::${name}>::Values) - 1 == UnderlyingValue(value),
static_assert(std::size(dom::binding_detail::EnumStrings<dom::${name}>::Values) - 1 == UnderlyingValue(value),
"Mismatch between enum strings and enum count");
};
""",

View File

@ -163,12 +163,12 @@ namespace mozilla::dom {
* // Getting offset value from somewhere.
* uint32_t data[3];
* if (!aUint32Array.CopyDataTo(data, [&](const size_t& aLength) {
* if (aLength - offset != ArrayLength(data)) {
* if (aLength - offset != std::size(data)) {
* aError.ThrowTypeError("Typed array doesn't contain the right"
* " amount of data");
* return Maybe<std::pair<size_t, size_t>>();
* }
* return Some(std::make_pair(offset, ArrayLength(data)));
* return Some(std::make_pair(offset, std::size(data)));
* }) {
* return;
* }
@ -213,12 +213,12 @@ namespace mozilla::dom {
* Maybe<Buffer<uint8_t>> buffer =
* aUint8Array.CreateFromData<Buffer<uint8_t>>([&](
* const size_t& aLength) {
* if (aLength - offset != ArrayLength(data)) {
* if (aLength - offset != std::size(data)) {
* aError.ThrowTypeError(
* "Typed array doesn't contain the right amount" of data");
* return Maybe<std::pair<size_t, size_t>>();
* }
* return Some(std::make_pair(offset, ArrayLength(data)));
* return Some(std::make_pair(offset, std::size(data)));
* });
* if (buffer.isNothing()) {
* return;

View File

@ -169,14 +169,7 @@ already_AddRefed<BroadcastChannel> BroadcastChannel::Constructor(
return nullptr;
}
nsCOMPtr<nsIGlobalObject> incumbent = mozilla::dom::GetIncumbentGlobal();
if (!incumbent) {
aRv.Throw(NS_ERROR_FAILURE);
return nullptr;
}
nsCOMPtr<nsIScriptObjectPrincipal> sop = do_QueryInterface(incumbent);
nsCOMPtr<nsIScriptObjectPrincipal> sop = do_QueryInterface(global);
if (NS_WARN_IF(!sop)) {
aRv.Throw(NS_ERROR_FAILURE);
return nullptr;

View File

@ -185,13 +185,13 @@ bool operator!=(StrongGLenum<Details> a, GLenum b) {
#define STRONG_GLENUM_BEGIN(NAME) const uint16_t NAME##Values[] = {
#define STRONG_GLENUM_VALUE(VALUE) LOCAL_GL_##VALUE
#define STRONG_GLENUM_END(NAME) \
} \
; \
struct NAME##Details { \
static size_t valuesCount() { return MOZ_ARRAY_LENGTH(NAME##Values); } \
static const uint16_t* values() { return NAME##Values; } \
}; \
#define STRONG_GLENUM_END(NAME) \
} \
; \
struct NAME##Details { \
static size_t valuesCount() { return std::size(NAME##Values); } \
static const uint16_t* values() { return NAME##Values; } \
}; \
typedef StrongGLenum<NAME##Details> NAME;
////////////////////////////////////////////////////////////////////////////////

View File

@ -358,7 +358,7 @@ nsresult CryptoKey::AddPublicKeyData(SECKEYPublicKey* aPublicKey) {
};
mPrivateKey =
PrivateKeyFromPrivateKeyTemplate(keyTemplate, ArrayLength(keyTemplate));
PrivateKeyFromPrivateKeyTemplate(keyTemplate, std::size(keyTemplate));
NS_ENSURE_TRUE(mPrivateKey, NS_ERROR_DOM_OPERATION_ERR);
return NS_OK;
@ -716,7 +716,7 @@ UniqueSECKEYPrivateKey CryptoKey::PrivateKeyFromJwk(const JsonWebKey& aJwk) {
};
return PrivateKeyFromPrivateKeyTemplate(keyTemplate,
ArrayLength(keyTemplate));
std::size(keyTemplate));
}
if (aJwk.mKty.EqualsLiteral(JWK_TYPE_RSA)) {
@ -757,7 +757,7 @@ UniqueSECKEYPrivateKey CryptoKey::PrivateKeyFromJwk(const JsonWebKey& aJwk) {
};
return PrivateKeyFromPrivateKeyTemplate(keyTemplate,
ArrayLength(keyTemplate));
std::size(keyTemplate));
}
if (aJwk.mKty.EqualsLiteral(JWK_TYPE_OKP)) {
@ -823,7 +823,7 @@ UniqueSECKEYPrivateKey CryptoKey::PrivateKeyFromJwk(const JsonWebKey& aJwk) {
};
return PrivateKeyFromPrivateKeyTemplate(keyTemplate,
ArrayLength(keyTemplate));
std::size(keyTemplate));
}
return nullptr;

View File

@ -132,7 +132,7 @@ struct JSStructuredCloneWriter;
static const uint8_t id_ecDH[] = {0x2b, 0x81, 0x04, 0x70};
const SECItem SEC_OID_DATA_EC_DH = {
siBuffer, (unsigned char*)id_ecDH,
static_cast<unsigned int>(mozilla::ArrayLength(id_ecDH))};
static_cast<unsigned int>(std::size(id_ecDH))};
namespace mozilla::dom {

View File

@ -292,7 +292,7 @@ void Clipboard::RequestRead(Promise* aPromise, ReadRequestType aType,
return;
}
AutoTArray<nsCString, ArrayLength(kMandatoryDataTypes)> types;
AutoTArray<nsCString, std::size(kMandatoryDataTypes)> types;
types.AppendElements(Span<const nsLiteralCString>(kMandatoryDataTypes));
callback = MakeRefPtr<ClipboardGetCallbackForRead>(global, std::move(p));

View File

@ -283,7 +283,7 @@ void DataTransfer::SetEffectAllowed(const nsAString& aEffectAllowed) {
static_assert(nsIDragService::DRAGDROP_ACTION_LINK == 4,
"DRAGDROP_ACTION_LINK constant is wrong");
for (uint32_t e = 0; e < ArrayLength(sEffects); e++) {
for (uint32_t e = 0; e < std::size(sEffects); e++) {
if (aEffectAllowed.EqualsASCII(sEffects[e])) {
mEffectAllowed = e;
break;
@ -664,7 +664,7 @@ void DataTransfer::GetExternalClipboardFormats(const bool& aPlainTextOnly,
AutoTArray<nsCString, 1>{nsLiteralCString(kTextMime)}, *mClipboardType,
wc, getter_AddRefs(clipboardDataSnapshot));
} else {
AutoTArray<nsCString, ArrayLength(kNonPlainTextExternalFormats)> formats;
AutoTArray<nsCString, std::size(kNonPlainTextExternalFormats)> formats;
formats.AppendElements(
Span<const nsLiteralCString>(kNonPlainTextExternalFormats));
rv = clipboard->GetDataSnapshotSync(formats, *mClipboardType, wc,
@ -677,7 +677,7 @@ void DataTransfer::GetExternalClipboardFormats(const bool& aPlainTextOnly,
// Order is important for DataTransfer; ensure the returned list items follow
// the sequence specified in kNonPlainTextExternalFormats.
AutoTArray<nsCString, ArrayLength(kNonPlainTextExternalFormats)> flavors;
AutoTArray<nsCString, std::size(kNonPlainTextExternalFormats)> flavors;
clipboardDataSnapshot->GetFlavorList(flavors);
for (const auto& format : kNonPlainTextExternalFormats) {
if (flavors.Contains(format)) {
@ -1370,7 +1370,7 @@ void DataTransfer::CacheExternalDragFormats() {
FillInExternalCustomTypes(c, sysPrincipal);
}
for (uint32_t f = 0; f < ArrayLength(formats); f++) {
for (uint32_t f = 0; f < std::size(formats); f++) {
// IsDataFlavorSupported doesn't take an index as an argument and just
// checks if any of the items support a particular flavor, even though
// the GetData method does take an index. Here, we just assume that

View File

@ -268,7 +268,7 @@ class DataTransfer final : public nsISupports, public nsWrapperCache {
*/
uint32_t DropEffectInt() const { return mDropEffect; }
void SetDropEffectInt(uint32_t aDropEffectInt) {
MOZ_RELEASE_ASSERT(aDropEffectInt < ArrayLength(sEffects),
MOZ_RELEASE_ASSERT(aDropEffectInt < std::size(sEffects),
"Bogus drop effect value");
mDropEffect = aDropEffectInt;
}

View File

@ -94,7 +94,7 @@ void DataTransferItem::SetData(nsIVariant* aData) {
MOZ_ASSERT(!mType.EqualsASCII(kNativeImageMime));
mKind = KIND_STRING;
for (uint32_t i = 0; i < ArrayLength(kFileMimeNameMap); ++i) {
for (uint32_t i = 0; i < std::size(kFileMimeNameMap); ++i) {
if (mType.EqualsASCII(kFileMimeNameMap[i].mMimeName)) {
mKind = KIND_FILE;
break;
@ -415,7 +415,7 @@ already_AddRefed<FileSystemEntry> DataTransferItem::GetAsEntry(
already_AddRefed<File> DataTransferItem::CreateFileFromInputStream(
nsIInputStream* aStream) {
const char* key = nullptr;
for (uint32_t i = 0; i < ArrayLength(kFileMimeNameMap); ++i) {
for (uint32_t i = 0; i < std::size(kFileMimeNameMap); ++i) {
if (mType.EqualsASCII(kFileMimeNameMap[i].mMimeName)) {
key = kFileMimeNameMap[i].mFileName;
break;

View File

@ -487,7 +487,7 @@ int32_t KeyEventHandler::GetMatchingKeyCode(const nsAString& aKeyName) {
uint32_t keyNameLength = keyName.Length();
const char* keyNameStr = keyName.get();
for (unsigned long i = 0; i < ArrayLength(gKeyCodes) - 1; ++i) {
for (unsigned long i = 0; i < std::size(gKeyCodes) - 1; ++i) {
if (keyNameLength == gKeyCodes[i].strlength &&
!nsCRT::strcmp(gKeyCodes[i].str, keyNameStr)) {
return gKeyCodes[i].keycode;

View File

@ -225,7 +225,7 @@ bool UIEvent::Deserialize(IPC::MessageReader* aReader) {
// XXX Following struct and array are used only in
// UIEvent::ComputeModifierState(), but if we define them in it,
// we fail to build on Mac at calling mozilla::ArrayLength().
// we fail to build on Mac at calling std::size().
struct ModifierPair {
Modifier modifier;
const char* name;
@ -263,7 +263,7 @@ Modifiers UIEvent::ComputeModifierState(const nsAString& aModifiersList) {
aModifiersList.BeginReading(listStart);
aModifiersList.EndReading(listEnd);
for (uint32_t i = 0; i < ArrayLength(kPairs); i++) {
for (uint32_t i = 0; i < std::size(kPairs); i++) {
nsAString::const_iterator start(listStart), end(listEnd);
if (!FindInReadable(NS_ConvertASCIItoUTF16(kPairs[i].name), start, end)) {
continue;

View File

@ -270,13 +270,13 @@ already_AddRefed<Promise> GamepadServiceTest::NewPoseMove(
GamepadCapabilityFlags::Cap_LinearAcceleration;
if (!aOrient.IsNull()) {
DebugOnly<bool> ok = aOrient.Value().CopyDataTo(poseState.orientation);
MOZ_ASSERT(
ok, "aOrient.Value().Length() != ArrayLength(poseState.orientation)");
MOZ_ASSERT(ok,
"aOrient.Value().Length() != std::size(poseState.orientation)");
poseState.isOrientationValid = true;
}
if (!aPos.IsNull()) {
DebugOnly<bool> ok = aPos.Value().CopyDataTo(poseState.position);
MOZ_ASSERT(ok, "aPos.Value().Length() != ArrayLength(poseState.position)");
MOZ_ASSERT(ok, "aPos.Value().Length() != std::size(poseState.position)");
poseState.isPositionValid = true;
}
if (!aAngVelocity.IsNull()) {
@ -284,28 +284,28 @@ already_AddRefed<Promise> GamepadServiceTest::NewPoseMove(
aAngVelocity.Value().CopyDataTo(poseState.angularVelocity);
MOZ_ASSERT(ok,
"aAngVelocity.Value().Length() != "
"ArrayLength(poseState.angularVelocity)");
"std::size(poseState.angularVelocity)");
}
if (!aAngAcceleration.IsNull()) {
DebugOnly<bool> ok =
aAngAcceleration.Value().CopyDataTo(poseState.angularAcceleration);
MOZ_ASSERT(ok,
"aAngAcceleration.Value().Length() != "
"ArrayLength(poseState.angularAcceleration)");
"std::size(poseState.angularAcceleration)");
}
if (!aLinVelocity.IsNull()) {
DebugOnly<bool> ok =
aLinVelocity.Value().CopyDataTo(poseState.linearVelocity);
MOZ_ASSERT(ok,
"aLinVelocity.Value().Length() != "
"ArrayLength(poseState.linearVelocity)");
"std::size(poseState.linearVelocity)");
}
if (!aLinAcceleration.IsNull()) {
DebugOnly<bool> ok =
aLinAcceleration.Value().CopyDataTo(poseState.linearAcceleration);
MOZ_ASSERT(ok,
"aLinAcceleration.Value().Length() != "
"ArrayLength(poseState.linearAcceleration)");
"std::size(poseState.linearAcceleration)");
}
GamepadPoseInformation a(poseState);
@ -339,12 +339,12 @@ already_AddRefed<Promise> GamepadServiceTest::NewTouch(
touchState.touchId = aTouchId;
touchState.surfaceId = aSurfaceId;
DebugOnly<bool> ok = aPos.CopyDataTo(touchState.position);
MOZ_ASSERT(ok, "aPos.Length() != ArrayLength(touchState.position)");
MOZ_ASSERT(ok, "aPos.Length() != std::size(touchState.position)");
if (!aSurfDim.IsNull()) {
ok = aSurfDim.Value().CopyDataTo(touchState.surfaceDimensions);
MOZ_ASSERT(
ok, "aSurfDim.Length() != ArrayLength(touchState.surfaceDimensions)");
MOZ_ASSERT(ok,
"aSurfDim.Length() != std::size(touchState.surfaceDimensions)");
touchState.isSurfaceDimensionsValid = true;
}

View File

@ -33,7 +33,7 @@ class udev_lib {
const char* lib_names[] = {"libudev.so.0", "libudev.so.1"};
// Check whether a library is already loaded so we don't load two
// conflicting libs.
for (unsigned i = 0; i < ArrayLength(lib_names); i++) {
for (unsigned i = 0; i < std::size(lib_names); i++) {
lib = dlopen(lib_names[i], RTLD_NOLOAD | RTLD_LAZY | RTLD_GLOBAL);
if (lib) {
break;
@ -42,7 +42,7 @@ class udev_lib {
// If nothing loads the first time through, it means no version of libudev
// was already loaded.
if (!lib) {
for (unsigned i = 0; i < ArrayLength(lib_names); i++) {
for (unsigned i = 0; i < std::size(lib_names); i++) {
lib = dlopen(lib_names[i], RTLD_LAZY | RTLD_GLOBAL);
if (lib) {
break;

View File

@ -31,7 +31,6 @@ namespace {
using namespace mozilla;
using namespace mozilla::dom;
using mozilla::ArrayLength;
// USB HID usage tables, page 1, 0x30 = X
const uint32_t kAxisMinimumUsageNumber = 0x30;
@ -92,7 +91,7 @@ const struct {
{XINPUT_GAMEPAD_B, 1},
{XINPUT_GAMEPAD_X, 2},
{XINPUT_GAMEPAD_Y, 3}};
const size_t kNumMappings = ArrayLength(kXIButtonMap);
const size_t kNumMappings = std::size(kXIButtonMap);
enum GamepadType { kNoGamepad = 0, kRawInputGamepad, kXInputGamepad };
@ -164,7 +163,7 @@ class XInputLoader {
// xinput1_3.dll shipped with the DirectX SDK
const wchar_t* dlls[] = {L"xinput1_4.dll", L"xinput9_1_0.dll",
L"xinput1_3.dll"};
const size_t kNumDLLs = ArrayLength(dlls);
const size_t kNumDLLs = std::size(dlls);
for (size_t i = 0; i < kNumDLLs; ++i) {
module = LoadLibraryW(dlls[i]);
if (module) {
@ -229,7 +228,7 @@ double ScaleAxis(ULONG value, LONG min, LONG max) {
* know how to handle.
*/
bool SupportedUsage(USHORT page, USHORT usage) {
for (unsigned i = 0; i < ArrayLength(kUsagePages); i++) {
for (unsigned i = 0; i < std::size(kUsagePages); i++) {
if (page == kUsagePages[i].usagePage && usage == kUsagePages[i].usage) {
return true;
}
@ -675,7 +674,7 @@ bool WindowsGamepadService::GetRawGamepad(HANDLE handle) {
}
if (gamepad_name.Length() == 0 || !gamepad_name[0]) {
const char kUnknown[] = "Unknown Gamepad";
gamepad_name.SetLength(ArrayLength(kUnknown));
gamepad_name.SetLength(std::size(kUnknown));
strcpy_s(gamepad_name.Elements(), gamepad_name.Length(), kUnknown);
}
@ -987,8 +986,8 @@ void WindowsGamepadService::DevicesChanged(bool aIsStablizing) {
}
bool RegisterRawInput(HWND hwnd, bool enable) {
nsTArray<RAWINPUTDEVICE> rid(ArrayLength(kUsagePages));
rid.SetLength(ArrayLength(kUsagePages));
nsTArray<RAWINPUTDEVICE> rid(std::size(kUsagePages));
rid.SetLength(std::size(kUsagePages));
for (unsigned i = 0; i < rid.Length(); i++) {
rid[i].usUsagePage = kUsagePages[i].usagePage;

View File

@ -178,7 +178,7 @@ static const nsAttrValue::EnumTable kInputTypeTable[] = {
// Default type is 'text'.
static const nsAttrValue::EnumTable* kInputDefaultType =
&kInputTypeTable[ArrayLength(kInputTypeTable) - 2];
&kInputTypeTable[std::size(kInputTypeTable) - 2];
static const nsAttrValue::EnumTable kCaptureTable[] = {
{"user", nsIFilePicker::captureUser},
@ -5418,12 +5418,12 @@ bool HTMLInputElement::ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute,
FormControlType(kInputDefaultType->value) == FormControlType::InputText,
"Someone forgot to update kInputDefaultType when adding a new "
"input type.");
MOZ_ASSERT(kInputTypeTable[ArrayLength(kInputTypeTable) - 1].tag == nullptr,
MOZ_ASSERT(kInputTypeTable[std::size(kInputTypeTable) - 1].tag == nullptr,
"Last entry in the table must be the nullptr guard");
MOZ_ASSERT(FormControlType(
kInputTypeTable[ArrayLength(kInputTypeTable) - 2].value) ==
FormControlType::InputText,
"Next to last entry in the table must be the \"text\" entry");
MOZ_ASSERT(
FormControlType(kInputTypeTable[std::size(kInputTypeTable) - 2].value) ==
FormControlType::InputText,
"Next to last entry in the table must be the \"text\" entry");
if (aNamespaceID == kNameSpaceID_None) {
if (aAttribute == nsGkAtoms::type) {

View File

@ -336,7 +336,7 @@ void TextTrackManager::HonorUserPreferencesForTrackSelection() {
// Steps 1 - 3: Perform automatic track selection for different TextTrack
// Kinds.
PerformTrackSelection(ttKinds, ArrayLength(ttKinds));
PerformTrackSelection(ttKinds, std::size(ttKinds));
PerformTrackSelection(TextTrackKind::Descriptions);
PerformTrackSelection(TextTrackKind::Chapters);
@ -363,7 +363,7 @@ bool TextTrackManager::TrackIsDefault(TextTrack* aTextTrack) {
void TextTrackManager::PerformTrackSelection(TextTrackKind aTextTrackKind) {
TextTrackKind ttKinds[] = {aTextTrackKind};
PerformTrackSelection(ttKinds, ArrayLength(ttKinds));
PerformTrackSelection(ttKinds, std::size(ttKinds));
}
void TextTrackManager::PerformTrackSelection(TextTrackKind aTextTrackKinds[],

View File

@ -13234,7 +13234,7 @@ nsresult Maintenance::DirectoryWork() {
PERSISTENCE_TYPE_TEMPORARY, PERSISTENCE_TYPE_PRIVATE};
static_assert(
ArrayLength(kPersistenceTypes) == size_t(PERSISTENCE_TYPE_INVALID),
std::size(kPersistenceTypes) == size_t(PERSISTENCE_TYPE_INVALID),
"Something changed with available persistence types!");
constexpr auto idbDirName =

View File

@ -1598,7 +1598,7 @@ void ContentParent::Init() {
nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
if (obs) {
size_t length = ArrayLength(sObserverTopics);
size_t length = std::size(sObserverTopics);
for (size_t i = 0; i < length; ++i) {
obs->AddObserver(this, sObserverTopics[i], false);
}
@ -1963,7 +1963,7 @@ void ContentParent::ActorDestroy(ActorDestroyReason why) {
nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
if (obs) {
size_t length = ArrayLength(sObserverTopics);
size_t length = std::size(sObserverTopics);
for (size_t i = 0; i < length; ++i) {
obs->RemoveObserver(static_cast<nsIObserver*>(this), sObserverTopics[i]);
}

View File

@ -594,9 +594,9 @@ void MathMLElement::MapGlobalMathMLAttributesInto(
!aBuilder.PropertyIsSet(eCSSProperty_direction)) {
auto str = value->GetStringValue();
static const char dirs[][4] = {"ltr", "rtl"};
static const StyleDirection dirValues[MOZ_ARRAY_LENGTH(dirs)] = {
static const StyleDirection dirValues[std::size(dirs)] = {
StyleDirection::Ltr, StyleDirection::Rtl};
for (uint32_t i = 0; i < ArrayLength(dirs); ++i) {
for (uint32_t i = 0; i < std::size(dirs); ++i) {
if (str.LowerCaseEqualsASCII(dirs[i])) {
aBuilder.SetKeywordValue(eCSSProperty_direction, dirValues[i]);
break;
@ -611,9 +611,9 @@ void MathMLElement::MapGlobalMathMLAttributesInto(
!aBuilder.PropertyIsSet(eCSSProperty_math_style)) {
auto str = value->GetStringValue();
static const char displaystyles[][6] = {"false", "true"};
static const StyleMathStyle mathStyle[MOZ_ARRAY_LENGTH(displaystyles)] = {
static const StyleMathStyle mathStyle[std::size(displaystyles)] = {
StyleMathStyle::Compact, StyleMathStyle::Normal};
for (uint32_t i = 0; i < ArrayLength(displaystyles); ++i) {
for (uint32_t i = 0; i < std::size(displaystyles); ++i) {
if (str.LowerCaseEqualsASCII(displaystyles[i])) {
aBuilder.SetKeywordValue(eCSSProperty_math_style, mathStyle[i]);
break;

View File

@ -162,7 +162,7 @@ class AsyncLogger {
msg->data.mTimestamp = TimeStamp::Now();
msg->data.mDurationUs = 0; // unused, duration is end - begin
StringWriter writer(msg->data.mName, ArrayLength(msg->data.mName));
StringWriter writer(msg->data.mName, std::size(msg->data.mName));
size_t commentIndex;
DebugOnly<bool> truncated = writer.AppendCString(aName, &commentIndex);
@ -188,7 +188,7 @@ class AsyncLogger {
msg->data.mTimestamp = TimeStamp::Now();
msg->data.mDurationUs =
(static_cast<double>(aFrames) / aSampleRate) * 1e6;
size_t len = std::min(strlen(aName), ArrayLength(msg->data.mName));
size_t len = std::min(strlen(aName), std::size(msg->data.mName));
memcpy(msg->data.mName, aName, len);
msg->data.mName[len] = 0;
mMessageQueueProfiler.Push(msg);

View File

@ -1,22 +0,0 @@
/*
* Copyright 2015, Mozilla Foundation and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __ArrayUtils_h__
#define __ArrayUtils_h__
#define MOZ_ARRAY_LENGTH(array_) (sizeof(array_) / sizeof(array_[0]))
#endif

View File

@ -25,7 +25,6 @@
#include "content_decryption_module.h"
#include "ArrayUtils.h"
#include "ClearKeyUtils.h"
using namespace cdm;

Some files were not shown because too many files have changed in this diff Show More