From 2cc2b8288f0179b8e506d420dd27fada5652e0c3 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Sun, 24 Apr 2016 09:09:04 -0700 Subject: allow allocations on side threads (#365) --- src/wasm-binary.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/wasm-binary.h') 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 { } public: - WasmBinaryWriter(Module* input, BufferWithRandomAccess& o, bool debug) : o(o), debug(debug) { - wasm = allocator.alloc(); - *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(); } -- cgit v1.2.3