import changes from `dev' branch of rmottola/Arctic-Fox:

- Bug 1186794 (part 1) - Replace nsBaseHashtable::EnumerateRead() calls in embedding/ with iterators. r=bz. (6fe5143d52)
- Bug 1186794 (part 2) - Replace nsBaseHashtable::EnumerateRead() calls in embedding/ with iterators. r=bz. (60b476c313)
- Bug 1186794 (part 3) - Replace nsBaseHashtable::EnumerateRead() calls in embedding/ with iterators. r=bz. (67a47940ea)
- Bug 1186794 (part 4) - Replace nsBaseHashtable::EnumerateRead() calls in embedding/ with iterators. r=bz. (73429ab30e)
- Bug 1186794 (part 5) - Replace nsBaseHashtable::EnumerateRead() calls in embedding/ with iterators. r=bz. (bec166adb4)
- Bug 1186794 (part 6) - Replace nsBaseHashtable::EnumerateRead() calls in embedding/ with iterators. r=bz. (ad0e59fc8d)
- Bug 1206146 - Use channel->AsyncOpen2() in embedding/components/webbrowserpersist/nsWebBrowserPersist.cpp (r=sicking) (f83ab0f992)
- Bug 1168726 - Use performange.getEntriesByType instead of getEntries in test if there is no clear reason. r=baku (d713f13e3a)
- Bug 1217963 - Correct the spelling of "corect" rs=mossop (b573845adf)
- Bug 1217015 - Convert AccEventGen.py to GENERATED_FILES and get rid of most of accessible/xpcom/Makefile.in r=glandium,tbsaunde (b383b420d9)
- bug 1219528 - add ProxyAccessible::{Next,Prev}Sibling() and ProxyAccessible::{First,Last}Child() r=davidb (e36c42e47d)
- Bug 1210441 - ProxyAccessible::IsTable* should take tabular MathML accessibles into account. r=tbsaunde (aca5099564)
- var-let (0f99722c93)
- Bug 862148 - drop support for Sherlock plugins in window.sidebar.addSearchEngine, r=adw. (1dafe754ab)
- Bug 862148 - stop supporting installation of Sherlock plugins through Services.search.addEngine, r=adw. (9dac4aa54c)
- Bug 1214174 - Prevent out of memory exception on accessing window.sidebar/window.external in a windowless browser. r=billm (e5bd691946)
This commit is contained in:
2023-01-24 12:41:43 +08:00
parent 7edec4880a
commit ded50ce4b2
38 changed files with 368 additions and 551 deletions
@@ -178,18 +178,6 @@ nsControllerCommandTable::GetCommandState(const char* aCommandName,
aCommandRefCon);
}
static PLDHashOperator
AddCommand(const nsACString& aKey, nsIControllerCommand* aData, void* aArg)
{
// aArg is a pointer to a array of strings. It gets incremented after
// allocating each one so that it points to the next location for AddCommand
// to assign a string to.
char*** commands = static_cast<char***>(aArg);
(**commands) = ToNewCString(aKey);
(*commands)++;
return PL_DHASH_NEXT;
}
NS_IMETHODIMP
nsControllerCommandTable::GetSupportedCommands(uint32_t* aCount,
char*** aCommands)
@@ -199,7 +187,10 @@ nsControllerCommandTable::GetSupportedCommands(uint32_t* aCount,
*aCount = mCommandsTable.Count();
*aCommands = commands;
mCommandsTable.EnumerateRead(AddCommand, &commands);
for (auto iter = mCommandsTable.Iter(); !iter.Done(); iter.Next()) {
*commands = ToNewCString(iter.Key());
commands++;
}
return NS_OK;
}