Skip to content

Commit

Permalink
Move debug check to runtime_debug.js. NFC
Browse files Browse the repository at this point in the history
  • Loading branch information
sbc100 committed Sep 30, 2024
1 parent a17e9d1 commit 6e7519f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 4 additions & 0 deletions src/runtime_debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
})();
#endif

if (Module['ENVIRONMENT']) {
throw new Error('Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)');
}

function legacyModuleProp(prop, newName, incoming=true) {
if (!Object.getOwnPropertyDescriptor(Module, prop)) {
Object.defineProperty(Module, prop, {
Expand Down
6 changes: 0 additions & 6 deletions src/shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,6 @@ var ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIR
#endif
#endif // ENVIRONMENT

#if ASSERTIONS
if (Module['ENVIRONMENT']) {
throw new Error('Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)');
}
#endif

#if PTHREADS
// Three configurations we can be running in:
// 1) We could be the application main() thread running in the main JS UI thread. (ENVIRONMENT_IS_WORKER == false and ENVIRONMENT_IS_PTHREAD == false)
Expand Down

0 comments on commit 6e7519f

Please sign in to comment.