1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-12-21 21:29:17 +00:00

don't use WASM for Node tests until we get memory errors fixed

This commit is contained in:
Steven Hugg 2018-07-10 00:09:10 -05:00
parent a208f19efe
commit 65210b39b8
2 changed files with 6 additions and 6 deletions

View File

@ -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);

View File

@ -13,7 +13,7 @@
"alwaysStrict": true
},
"include": [
"./src/*.ts",
"./src/**/*.ts",
"./localForage/typings/*.ts"
]
}