11cb0ef41Sopenharmony_ci// There aren't many cloneable types that will cause an error on
21cb0ef41Sopenharmony_ci// deserialization. WASM modules have the property that it's an error to
31cb0ef41Sopenharmony_ci// deserialize them cross-site, which works for our purposes.
41cb0ef41Sopenharmony_ciasync function createWasmModule() {
51cb0ef41Sopenharmony_ci  // It doesn't matter what the module is, so we use one from another
61cb0ef41Sopenharmony_ci  // test.
71cb0ef41Sopenharmony_ci  const response =
81cb0ef41Sopenharmony_ci        await fetch("/wasm/serialization/module/resources/incrementer.wasm");
91cb0ef41Sopenharmony_ci  const ab = await response.arrayBuffer();
101cb0ef41Sopenharmony_ci  return WebAssembly.compile(ab);
111cb0ef41Sopenharmony_ci}
12