Skip to content

Commit 3ab843b

Browse files
authored
wavm: clone integration in Wavm::clone() (#83)
Signed-off-by: mathetake <[email protected]>
1 parent 7bd429d commit 3ab843b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/wavm/wavm.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// limitations under the License.
1515

1616
#include "include/proxy-wasm/wavm.h"
17+
#include "include/proxy-wasm/wasm_vm.h"
1718

1819
#include <cstdlib>
1920
#include <iostream>
@@ -24,8 +25,6 @@
2425
#include <utility>
2526
#include <vector>
2627

27-
#include "include/proxy-wasm/wasm_vm.h"
28-
2928
#include "WAVM/IR/Module.h"
3029
#include "WAVM/IR/Operators.h"
3130
#include "WAVM/IR/Types.h"
@@ -253,6 +252,8 @@ Wavm::~Wavm() {
253252

254253
std::unique_ptr<WasmVm> Wavm::clone() {
255254
auto wavm = std::make_unique<Wavm>();
255+
wavm->integration().reset(integration()->clone());
256+
256257
wavm->compartment_ = WAVM::Runtime::cloneCompartment(compartment_);
257258
wavm->memory_ = WAVM::Runtime::remapToClonedCompartment(memory_, wavm->compartment_);
258259
wavm->memory_base_ = WAVM::Runtime::getMemoryBaseAddress(wavm->memory_);

0 commit comments

Comments
 (0)