Skip to content

Commit fb12928

Browse files
committed
Don't refer to ENVIRONMENT_IS_PTHREADS if not building with pthreads enabled.
1 parent 9231b40 commit fb12928

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/shell.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ var ENVIRONMENT_IS_WEB = typeof window === 'object';
4141
// 2) We could be the application main() thread proxied to worker. (with Emscripten -s PROXY_TO_WORKER=1) (ENVIRONMENT_IS_WORKER == true, ENVIRONMENT_IS_PTHREAD == false)
4242
// 3) We could be an application pthread running in a worker. (ENVIRONMENT_IS_WORKER == true and ENVIRONMENT_IS_PTHREAD == true)
4343
var ENVIRONMENT_IS_WORKER = typeof importScripts === 'function';
44+
#if USE_PTHREADS
4445
if (typeof ENVIRONMENT_IS_PTHREAD === 'undefined') ENVIRONMENT_IS_PTHREAD = false; // ENVIRONMENT_IS_PTHREAD=true will have been preset in pthread-main.js.
46+
#endif
4547
var ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER;
4648

4749
if (ENVIRONMENT_IS_NODE) {

0 commit comments

Comments
 (0)