mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-20 00:20:37 +00:00
Bug 1328151: Check for OOM in BinaryToAST initialization of result; r=luke
MozReview-Commit-ID: 3tnx4rS6rZc --HG-- extra : amend_source : d3d4a59b4df0d4e4bb0a7eed171d33cea8c74973
This commit is contained in:
parent
d05d412856
commit
d43de884f1
@ -1887,7 +1887,7 @@ wasm::BinaryToAst(JSContext* cx, const uint8_t* bytes, uint32_t length,
|
||||
LifoAlloc& lifo, AstModule** module)
|
||||
{
|
||||
AstModule* result = new(lifo) AstModule(lifo);
|
||||
if (!result->init())
|
||||
if (!result || !result->init())
|
||||
return false;
|
||||
|
||||
UniqueChars error;
|
||||
|
Loading…
x
Reference in New Issue
Block a user