Skip to content

Commit 0b7fb4f

Browse files
committed
Make all detectors async (fixes #15)
1 parent 1408eaa commit 0b7fb4f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

rollup-plugins/index-generator.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ export default function({ indexPath, pluginFolder }) {
5151
const importName = `${pluginName}_internal`;
5252
return `
5353
import { default as ${importName} } from "./${pluginFolder}/${plugin}/index.js";
54-
export const ${pluginName} = () => ${importName}(new Uint8Array(${moduleBytes}));
54+
export const ${pluginName} = async () => ${importName}(new Uint8Array(${moduleBytes}));
5555
`;
5656
}
5757
return `
58-
export const ${pluginName} = () => WebAssembly.validate(new Uint8Array(${moduleBytes}));
58+
export const ${pluginName} = async () => WebAssembly.validate(new Uint8Array(${moduleBytes}));
5959
`;
6060
})
6161
);

src/detectors/threads/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* limitations under the License.
1212
*/
1313

14-
export default moduleBytes => {
14+
export default async moduleBytes => {
1515
if (!WebAssembly.validate(moduleBytes)) return false;
1616
try {
1717
// Test for transferability of SABs (needed for Firefox)

0 commit comments

Comments
 (0)