diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-02-08 12:06:30 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-02-08 12:06:30 +0100 |
commit | 44cd9f2a915a4879371c5e0b059acc3e5a2378b0 (patch) | |
tree | 8cb1a4758b16d9caae55f525b73f5fca3824b4f7 /js/src/wasm/WasmModule.cpp | |
parent | f8d1830b530cd553d788b3579d41725d35c4da7f (diff) | |
parent | b62fce0dc0c77a5788c331db32b3996e4020e2a5 (diff) | |
download | UXP-44cd9f2a915a4879371c5e0b059acc3e5a2378b0.tar UXP-44cd9f2a915a4879371c5e0b059acc3e5a2378b0.tar.gz UXP-44cd9f2a915a4879371c5e0b059acc3e5a2378b0.tar.lz UXP-44cd9f2a915a4879371c5e0b059acc3e5a2378b0.tar.xz UXP-44cd9f2a915a4879371c5e0b059acc3e5a2378b0.zip |
Merge branch 'ported-upstream'
Diffstat (limited to 'js/src/wasm/WasmModule.cpp')
-rw-r--r-- | js/src/wasm/WasmModule.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/js/src/wasm/WasmModule.cpp b/js/src/wasm/WasmModule.cpp index be7ddba8f..b24e01a40 100644 --- a/js/src/wasm/WasmModule.cpp +++ b/js/src/wasm/WasmModule.cpp @@ -1007,12 +1007,16 @@ Module::instantiate(JSContext* cx, maybeBytecode = bytecode_.get(); auto codeSegment = CodeSegment::create(cx, code_, linkData_, *metadata_, memory); - if (!codeSegment) + if (!codeSegment) { + ReportOutOfMemory(cx); return false; + } auto code = cx->make_unique<Code>(Move(codeSegment), *metadata_, maybeBytecode); - if (!code) + if (!code) { + ReportOutOfMemory(cx); return false; + } instance.set(WasmInstanceObject::create(cx, Move(code), |