From 10b54a4974fbe11ff0e21404f2968419461d321c Mon Sep 17 00:00:00 2001 From: Sven Sauleau Date: Fri, 25 Jan 2019 17:40:11 +0100 Subject: [PATCH] [js-api] use DOMString (#947) Switching from USVString to DOMString will allow the string (argument) to contain non normalized surrogates. Currently, JavaScript engines already use a DOMString as argument. --- document/js-api/index.bs | 2 +- test/js-api/module/customSections.any.js | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/document/js-api/index.bs b/document/js-api/index.bs index e78a63a2..7ff05115 100644 --- a/document/js-api/index.bs +++ b/document/js-api/index.bs @@ -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); }; diff --git a/test/js-api/module/customSections.any.js b/test/js-api/module/customSections.any.js index 04c5abed..387d4e4a 100644 --- a/test/js-api/module/customSections.any.js +++ b/test/js-api/module/customSections.any.js @@ -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(() => {