Bug 1786117: Use ErrorContext-variant of ReportOutOfMemory in Stencil XDR. r=arai,bthrall

Differential Revision: https://phabricator.services.mozilla.com/D155433
This commit is contained in:
Mohamed Atef
2022-09-02 18:52:09 +00:00
parent 2ed8e827d5
commit d6af0e702b
12 changed files with 78 additions and 53 deletions

View File

@@ -5133,7 +5133,8 @@ static bool InstantiateModuleStencilXDR(JSContext* cx, uint32_t argc,
/* Deserialize the stencil from XDR. */
JS::TranscodeRange xdrRange(xdrObj->buffer(), xdrObj->bufferLength());
bool succeeded = false;
if (!stencil.deserializeStencils(cx, input.get(), xdrRange, &succeeded)) {
if (!stencil.deserializeStencils(cx, &ec, input.get(), xdrRange,
&succeeded)) {
return false;
}
if (!succeeded) {