diff --git a/runtime/StarlingMonkey b/runtime/StarlingMonkey index 8b909f0c03..150501f1aa 160000 --- a/runtime/StarlingMonkey +++ b/runtime/StarlingMonkey @@ -1 +1 @@ -Subproject commit 8b909f0c03fa63307a3d781efebc0f68f6303e88 +Subproject commit 150501f1aa1f65542ab4047218c4f14ac19f40b5 diff --git a/runtime/fastly/builtins/fastly.cpp b/runtime/fastly/builtins/fastly.cpp index 3c26b75efa..80effbb2e0 100644 --- a/runtime/fastly/builtins/fastly.cpp +++ b/runtime/fastly/builtins/fastly.cpp @@ -414,8 +414,6 @@ bool install(api::Engine *engine) { bool ENABLE_EXPERIMENTAL_HIGH_RESOLUTION_TIME_METHODS = std::string(std::getenv("ENABLE_EXPERIMENTAL_HIGH_RESOLUTION_TIME_METHODS")) == "1"; - engine->enable_module_mode(std::string(std::getenv("ENABLE_MODULE_MODE")) == "1"); - JS::SetOutOfMemoryCallback(engine->cx(), oom_callback, nullptr); JS::RootedObject fastly(engine->cx(), JS_NewPlainObject(engine->cx())); diff --git a/src/compileApplicationToWasm.js b/src/compileApplicationToWasm.js index 01c7e17b61..418002819c 100644 --- a/src/compileApplicationToWasm.js +++ b/src/compileApplicationToWasm.js @@ -131,14 +131,13 @@ export async function compileApplicationToWasm( ], { stdio: [null, process.stdout, process.stderr], - input: maybeWindowsPath(wizerInput), + input: `${maybeWindowsPath(wizerInput)}${enableExperimentalTopLevelAwait ? '' : ' --legacy-script'}`, shell: true, encoding: 'utf-8', env: { ...process.env, ENABLE_EXPERIMENTAL_HIGH_RESOLUTION_TIME_METHODS: enableExperimentalHighResolutionTimeMethods ? '1' : '0', - ENABLE_MODULE_MODE: enableExperimentalTopLevelAwait ? '1' : '0', }, }, ); @@ -161,14 +160,13 @@ export async function compileApplicationToWasm( ], { stdio: [null, process.stdout, process.stderr], - input: maybeWindowsPath(wizerInput), + input: `${maybeWindowsPath(wizerInput)}${enableExperimentalTopLevelAwait ? '' : ' --legacy-script'}`, shell: true, encoding: 'utf-8', env: { ...process.env, ENABLE_EXPERIMENTAL_HIGH_RESOLUTION_TIME_METHODS: enableExperimentalHighResolutionTimeMethods ? '1' : '0', - ENABLE_MODULE_MODE: enableExperimentalTopLevelAwait ? '1' : '0', }, }, );