diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-04-24 09:09:04 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-04-24 09:09:04 -0700 |
commit | 2cc2b8288f0179b8e506d420dd27fada5652e0c3 (patch) | |
tree | 3a80059fae25fe88bb784e3737ac6114198a9c24 /src/wasm-binary.h | |
parent | e9349f082af7d3057aa475a76a58cba7adac2b21 (diff) | |
download | binaryen-2cc2b8288f0179b8e506d420dd27fada5652e0c3.tar.gz binaryen-2cc2b8288f0179b8e506d420dd27fada5652e0c3.tar.bz2 binaryen-2cc2b8288f0179b8e506d420dd27fada5652e0c3.zip |
allow allocations on side threads (#365)
Diffstat (limited to 'src/wasm-binary.h')
-rw-r--r-- | src/wasm-binary.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/wasm-binary.h b/src/wasm-binary.h index 747f9a2ce..954521365 100644 --- a/src/wasm-binary.h +++ b/src/wasm-binary.h @@ -456,9 +456,7 @@ class WasmBinaryWriter : public Visitor<WasmBinaryWriter, void> { } public: - WasmBinaryWriter(Module* input, BufferWithRandomAccess& o, bool debug) : o(o), debug(debug) { - wasm = allocator.alloc<Module>(); - *wasm = *input; // simple shallow copy; we won't be modifying any internals, just adding some function types, so this is fine + WasmBinaryWriter(Module* input, BufferWithRandomAccess& o, bool debug) : wasm(input), o(o), debug(debug) { prepare(); } |