aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-02-09 16:38:19 -0800
committerAlon Zakai <alonzakai@gmail.com>2014-02-09 16:38:19 -0800
commit3ab1e6e8b3b72b1006f621ed55f8d708743d9cba (patch)
tree53279bfb9da7e2c9ddd25b970cc3900d4ca8bee9
parentb5f3e7a6700eef8c5bfb90e957257cf94b23f21b (diff)
emit aborting stubs for all missing functions, not just in asm mode
-rw-r--r--src/jsifier.js8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index d8bcf5b6..6742f504 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -499,12 +499,8 @@ function JSify(data, functionsOnly) {
if (!LINKABLE && !LibraryManager.library.hasOwnProperty(shortident) && !LibraryManager.library.hasOwnProperty(shortident + '__inline')) {
if (ERROR_ON_UNDEFINED_SYMBOLS) error('unresolved symbol: ' + shortident);
else if (VERBOSE || WARN_ON_UNDEFINED_SYMBOLS) warn('unresolved symbol: ' + shortident);
- if (ASM_JS) {
- // emit a stub that will fail during runtime. this allows asm validation to succeed.
- LibraryManager.library[shortident] = new Function("Module['printErr']('missing function: " + shortident + "'); abort(-1);");
- } else {
- cancel = true; // emit nothing, not even var X = undefined;
- }
+ // emit a stub that will fail at runtime
+ LibraryManager.library[shortident] = new Function("Module['printErr']('missing function: " + shortident + "'); abort(-1);");
}
item.JS = cancel ? ';' : addFromLibrary(shortident);
}