Skip to content

Commit 9cc922a

Browse files
authored
Remove unnecessary can_use_await function. NFC (#24419)
1 parent 58b8e80 commit 9cc922a

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

tools/emscripten.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -903,10 +903,6 @@ def create_reexports(metadata):
903903
return exports
904904

905905

906-
def can_use_await():
907-
return settings.MODULARIZE
908-
909-
910906
def install_debug_wrapper(sym):
911907
if settings.MINIMAL_RUNTIME or not settings.ASSERTIONS:
912908
return False
@@ -1044,7 +1040,7 @@ def create_module(metadata, function_exports, global_exports, tag_exports,librar
10441040
if settings.MODULARIZE == 'instance':
10451041
module.append("var wasmExports;\n")
10461042
elif settings.WASM_ASYNC_COMPILATION:
1047-
if can_use_await():
1043+
if settings.MODULARIZE:
10481044
# In modularize mode the generated code is within a factory function.
10491045
# This magic string gets replaced by `await createWasm`. It needed to allow
10501046
# closure and acorn to process the module without seeing this as a top-level

0 commit comments

Comments
 (0)