diff --git a/BUILD.gn b/BUILD.gn index fb68d0ec4d..533ec48b85 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -4451,7 +4451,7 @@ v8_source_set("v8_base_without_compiler") { ] if (v8_enable_webassembly) { - sources += [ + sources += [ ### gcmole(all) ### "src/asmjs/asm-js.cc", "src/asmjs/asm-parser.cc", "src/asmjs/asm-scanner.cc", diff --git a/src/wasm/wasm-js.cc b/src/wasm/wasm-js.cc index 4bdc389ffe..07e1675dd0 100644 --- a/src/wasm/wasm-js.cc +++ b/src/wasm/wasm-js.cc @@ -1668,7 +1668,7 @@ uint32_t GetEncodedSize(i::Handle tag_object) { } void EncodeExceptionValues(v8::Isolate* isolate, - i::PodArray signature, + i::Handle> signature, const Local& arg, ScheduledErrorThrower* thrower, i::Handle values_out) { @@ -1679,10 +1679,10 @@ void EncodeExceptionValues(v8::Isolate* isolate, return; } auto values = arg.As(); - for (int i = 0; i < signature.length(); ++i) { + for (int i = 0; i < signature->length(); ++i) { MaybeLocal maybe_value = values->Get(context, i); Local value = maybe_value.ToLocalChecked(); - i::wasm::ValueType type = signature.get(i); + i::wasm::ValueType type = signature->get(i); switch (type.kind()) { case i::wasm::kI32: { int32_t i32 = 0; @@ -1761,17 +1761,19 @@ void WebAssemblyException(const v8::FunctionCallbackInfo& args) { thrower.TypeError("Argument 0 must be a WebAssembly tag"); return; } - auto tag_object = i::Handle::cast(arg0); - auto tag = i::Handle( + i::Handle tag_object = + i::Handle::cast(arg0); + i::Handle tag( i::WasmExceptionTag::cast(tag_object->tag()), i_isolate); uint32_t size = GetEncodedSize(tag_object); i::Handle runtime_exception = i::WasmExceptionPackage::New(i_isolate, tag, size); // The constructor above should guarantee that the cast below succeeds. - auto values = i::Handle::cast( + i::Handle values = i::Handle::cast( i::WasmExceptionPackage::GetExceptionValues(i_isolate, runtime_exception)); - auto signature = tag_object->serialized_signature(); + i::Handle> signature( + tag_object->serialized_signature(), i_isolate); EncodeExceptionValues(isolate, signature, args[1], &thrower, values); if (thrower.error()) return; args.GetReturnValue().Set(