From 6e7910e09d53d250dddcd5bfff4f1e72aa71be05 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 7 Jan 2013 11:05:12 -0800 Subject: fix bug with adding non-functions to libraryFunctions in ASM_JS --- src/jsifier.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/jsifier.js b/src/jsifier.js index 5a16e484..86568203 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -423,7 +423,9 @@ function JSify(data, functionsOnly, givenFunctions) { deps.push(snippet); snippet = '_' + snippet; } - if (ASM_JS) Functions.libraryFunctions[ident] = 1; + if (ASM_JS && typeof LibraryManager.library[redirectedIdent] == 'function') { + Functions.libraryFunctions[ident] = 1; + } } else if (typeof snippet === 'object') { snippet = stringifyWithFunctions(snippet); } else if (typeof snippet === 'function') { -- cgit v1.2.3-18-g5258