From 65210b39b82e0e18c3b73375c311dc084674293b Mon Sep 17 00:00:00 2001 From: Steven Hugg Date: Tue, 10 Jul 2018 00:09:10 -0500 Subject: [PATCH] don't use WASM for Node tests until we get memory errors fixed --- src/worker/workermain.js | 10 +++++----- tsconfig.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/worker/workermain.js b/src/worker/workermain.js index 2a0c641c..95cde32c 100644 --- a/src/worker/workermain.js +++ b/src/worker/workermain.js @@ -1,5 +1,9 @@ "use strict"; +var ENVIRONMENT_IS_NODE = typeof process === 'object' && typeof require === 'function'; +var ENVIRONMENT_IS_WEB = typeof window === 'object'; +var ENVIRONMENT_IS_WORKER = typeof importScripts === 'function'; + // WebAssembly module cache // TODO: leaks memory even when disabled... var _WASM_module_cache = {}; @@ -313,7 +317,7 @@ function loadWASM(modulename, debug) { } function loadNative(modulename, debug) { // detect WASM - if (typeof WebAssembly === 'object') { + if (CACHE_WASM_MODULES && typeof WebAssembly === 'object') { loadWASM(modulename); } else { load(modulename); @@ -1389,10 +1393,6 @@ function handleMessage(data) { console.log("Unknown message",data); } -var ENVIRONMENT_IS_NODE = typeof process === 'object' && typeof require === 'function'; -var ENVIRONMENT_IS_WEB = typeof window === 'object'; -var ENVIRONMENT_IS_WORKER = typeof importScripts === 'function'; - if (ENVIRONMENT_IS_WORKER) { onmessage = function(e) { var result = handleMessage(e.data); diff --git a/tsconfig.json b/tsconfig.json index bb804d99..8e319e6f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -13,7 +13,7 @@ "alwaysStrict": true }, "include": [ - "./src/*.ts", + "./src/**/*.ts", "./localForage/typings/*.ts" ] }