Commit d8baf215 authored by Sven Sauleau's avatar Sven Sauleau Committed by Commit Bot

[wasm] fix js-api module/customSection

Enables WebAssembly's js-api module/customSection. The specification has
been updated; see https://github.com/WebAssembly/spec/issues/915. V8 was
already using DOMString.

Bug: v8:8633
Change-Id: I4c3e93c21594dbba84b3697e7e85069c3ff8b441
Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
Reviewed-on: https://chromium-review.googlesource.com/c/1415554
Commit-Queue: Sven Sauleau <ssauleau@igalia.com>
Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59182}
parent bf505216
......@@ -689,6 +689,11 @@ void WebAssemblyModuleCustomSections(
auto maybe_module = GetFirstArgumentAsModule(args, &thrower);
if (thrower.error()) return;
if (args[1]->IsUndefined()) {
thrower.TypeError("Argument 1 is required");
return;
}
i::MaybeHandle<i::Object> maybe_name =
i::Object::ToString(i_isolate, Utils::OpenHandle(*args[1]));
i::Handle<i::Object> name;
......@@ -1545,7 +1550,7 @@ void WebAssemblyGlobalSetValue(
return;
}
if (args[0]->IsUndefined()) {
thrower.TypeError("Argument 0: must be a value");
thrower.TypeError("Argument 0 is required");
return;
}
......
......@@ -3,11 +3,6 @@
# found in the LICENSE file.
[
[ALWAYS, {
# https://bugs.chromium.org/p/v8/issues/detail?id=8319
'module/customSections': [FAIL],
}], # ALWAYS
[ALWAYS, {
# https://bugs.chromium.org/p/v8/issues/detail?id=8633
'limits': [SKIP],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment