aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-01-07 11:05:12 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-01-07 11:05:12 -0800
commit6e7910e09d53d250dddcd5bfff4f1e72aa71be05 (patch)
tree1c82603ec2785a5783872ccfed8b441bbea3bfc4
parent006059dbb9c3a6863e8ef2870d3aecafc93b2529 (diff)
fix bug with adding non-functions to libraryFunctions in ASM_JS
-rw-r--r--src/jsifier.js4
1 files changed, 3 insertions, 1 deletions
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') {