minor comment about usage of eval()

pull/66/head
Paul Shapiro 6 years ago
parent 63ffa3e868
commit 2a6be2dcea

@ -727,7 +727,7 @@ module.exports = function(options)
// TODO: verify content - for now, relying on same-origin and tls/ssl // TODO: verify content - for now, relying on same-origin and tls/ssl
var Module = {} var Module = {}
try { try {
eval(content) // emscripten also does an eval eval(content) // I do not believe this is a safety concern, because content is server-controlled; https://humanwhocodes.com/blog/2013/06/25/eval-isnt-evil-just-misunderstood/
} catch (e) { } catch (e) {
reject(e) reject(e)
return return

@ -116,7 +116,7 @@ const moneroUtils_promise = new Promise(function(resolve, reject)
hasWebAssembly = false // to be clear hasWebAssembly = false // to be clear
} }
use_asmjs = hasWebAssembly != true use_asmjs = hasWebAssembly != true
} }
console.log("Using wasm: ", !use_asmjs) console.log("Using wasm: ", !use_asmjs)
const coreBridgeLoading_promise = require('./MyMoneroCoreBridge')({ asmjs: use_asmjs }); const coreBridgeLoading_promise = require('./MyMoneroCoreBridge')({ asmjs: use_asmjs });
coreBridgeLoading_promise.catch(function(e) coreBridgeLoading_promise.catch(function(e)

Loading…
Cancel
Save