aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormax99x <max99x@gmail.com>2011-06-26 02:30:45 +0300
committermax99x <max99x@gmail.com>2011-06-26 02:30:45 +0300
commit1ef7f3ce7f44792c4d8cfb1f2b5d908d94b7581c (patch)
treec600bd0415b4d4ec94224828b84e522edd6bca3f
parentf08cb4c404d482abf346c56726c0e97f69b0905b (diff)
Minor polish:
* Fixed loose "in" check for library functions in jsifier.js. * Made __globalConstructor__ a var in preamble_sharedlib.js.
-rw-r--r--src/jsifier.js2
-rw-r--r--src/preamble_sharedlib.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index d7143dde..a0c6ec72 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -203,7 +203,7 @@ function JSify(data, functionsOnly, givenFunctions, givenGlobalVariables) {
if (BUILD_AS_SHARED_LIB) {
// Shared libraries reuse the runtime of their parents.
item.JS = '';
- } else if (shortident in Library) {
+ } else if (Library.hasOwnProperty(shortident)) {
function addFromLibrary(ident) {
if (ident in addedLibraryItems) return '';
// Don't replace implemented functions with library ones (which can happen when we add dependencies).
diff --git a/src/preamble_sharedlib.js b/src/preamble_sharedlib.js
index 01d68cfe..4b91c44c 100644
--- a/src/preamble_sharedlib.js
+++ b/src/preamble_sharedlib.js
@@ -4,7 +4,7 @@
// Runtime essentials
//========================================
-function __globalConstructor__() {
+var __globalConstructor__ = function globalConstructor() {
}
// === Body ===