Skip to content

Commit

Permalink
[js-api] use DOMString (#947)
Browse files Browse the repository at this point in the history
Switching from USVString to DOMString will allow the string (argument)
to contain non normalized surrogates.

Currently, JavaScript engines already use a DOMString as argument.
  • Loading branch information
xtuc authored and binji committed Jan 25, 2019
1 parent fb1fdcb commit 10b54a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion document/js-api/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ dictionary ModuleImportDescriptor {
interface Module {
static sequence<ModuleExportDescriptor> exports(Module moduleObject);
static sequence<ModuleImportDescriptor> imports(Module moduleObject);
static sequence<ArrayBuffer> customSections(Module moduleObject, USVString sectionName);
static sequence<ArrayBuffer> customSections(Module moduleObject, DOMString sectionName);
};
</pre>

Expand Down
4 changes: 1 addition & 3 deletions test/js-api/module/customSections.any.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,7 @@ test(() => {
assert_sections(WebAssembly.Module.customSections(module, "na\uFFFDme"), [
bytes,
]);
assert_sections(WebAssembly.Module.customSections(module, "na\uDC01me"), [
bytes,
]);
assert_sections(WebAssembly.Module.customSections(module, "na\uDC01me"), []);
}, "Custom sections with U+FFFD");

test(() => {
Expand Down

0 comments on commit 10b54a4

Please sign in to comment.