Skip to content

Commit fd7e337

Browse files
liamappelbecommit-bot@chromium.org
authored andcommitted
[vm] Update wasmer and resolve a TODO.
Bug: #37882 Change-Id: Idee2f5383516e62ff3c228968c105835fcd954f3 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118200 Reviewed-by: Ryan Macnak <[email protected]> Commit-Queue: Liam Appelbe <[email protected]>
1 parent 5aafee5 commit fd7e337

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

runtime/lib/wasm.cc

+2-7
Original file line numberDiff line numberDiff line change
@@ -580,13 +580,8 @@ DEFINE_NATIVE_ENTRY(Wasm_callFunction, 0, 2) {
580580
"Wrong number of args. Expected %" Pu " but found %" Pd ".",
581581
fn->args().length(), args.Length())));
582582
}
583-
intptr_t length = fn->args().length();
584-
if (length == 0) {
585-
// Wasmer requires that our params ptr is valid, even if params_len is 0.
586-
// TODO(liama): Remove after https://github.com/wasmerio/wasmer/issues/753
587-
length = 1;
588-
}
589-
auto params = std::unique_ptr<wasmer_value_t[]>(new wasmer_value_t[length]);
583+
auto params = std::unique_ptr<wasmer_value_t[]>(
584+
new wasmer_value_t[fn->args().length()]);
590585
for (intptr_t i = 0; i < args.Length(); ++i) {
591586
if (!ToWasmValue(Number::Cast(Object::Handle(args.At(i))), fn->args()[i],
592587
&params[i])) {

third_party/wasmer/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[package]
22
name = "wasmer"
3-
version = "0.6.0"
3+
version = "0.7.0"
44

55
[lib]
66
name = "wasmer"
77
crate-type = ["staticlib"]
88
path = "wasmer.rs"
99

1010
[dependencies]
11-
wasmer-runtime-c-api = "0.6.0"
11+
wasmer-runtime-c-api = "0.7.0"

0 commit comments

Comments
 (0)