Bug 1786494 - Part 10: Use ErrorContext::recoverFromOutOfMemory in EmitterScope. r=bthrall

Differential Revision: https://phabricator.services.mozilla.com/D157450
This commit is contained in:
Tooru Fujisawa 2022-09-28 07:40:17 +00:00
parent 5a476becfa
commit d7e5d3da7e

View File

@ -195,7 +195,7 @@ NameLocation EmitterScope::searchAndCache(BytecodeEmitter* bce,
// It is always correct to not cache the location. Ignore OOMs to make
// lookups infallible.
if (!putNameInCache(bce, name, *loc)) {
bce->cx->recoverFromOutOfMemory();
bce->ec->recoverFromOutOfMemory();
}
return *loc;