зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1672105 - Part 3: Add comment about reserved size in ParserAtomEntry::resolve. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D94097
This commit is contained in:
Родитель
395872333d
Коммит
907d823ead
|
@ -282,6 +282,9 @@ JSAtom* ParserAtomEntry::instantiate(JSContext* cx,
|
|||
return nullptr;
|
||||
}
|
||||
auto index = atomCache.atoms.length();
|
||||
|
||||
// This cannot be infallibleAppend because there are toJSAtom consumers that
|
||||
// doesn't reserve CompilationAtomCache.atoms beforehand
|
||||
if (!atomCache.atoms.append(atom)) {
|
||||
js::ReportOutOfMemory(cx);
|
||||
return nullptr;
|
||||
|
|
Загрузка…
Ссылка в новой задаче