aboutsummaryrefslogtreecommitdiff
path: root/src/library_browser.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-06-20 18:15:36 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-06-20 18:15:36 -0700
commitc3ed656997ea4515d846debf45121af1bd174a51 (patch)
treede84436eba40aedf96ca8c091c743e0d7d79e965 /src/library_browser.js
parent0ad87244178badf26cd5c8e0ed88116e87026472 (diff)
parent97d19be7f46bb3b0862e575fc6e06abafca74df7 (diff)
Merge branch 'incoming'
Diffstat (limited to 'src/library_browser.js')
-rw-r--r--src/library_browser.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/library_browser.js b/src/library_browser.js
index 9800fedf..925b64e2 100644
--- a/src/library_browser.js
+++ b/src/library_browser.js
@@ -47,8 +47,11 @@ mergeInto(LibraryManager.library, {
workers: [],
init: function() {
- if (Browser.initted) return;
+ if (!Module["preloadPlugins"]) Module["preloadPlugins"] = []; // needs to exist even in workers
+
+ if (Browser.initted || ENVIRONMENT_IS_WORKER) return;
Browser.initted = true;
+
try {
new Blob();
Browser.hasBlobConstructor = true;
@@ -79,8 +82,6 @@ mergeInto(LibraryManager.library, {
}[name.substr(name.lastIndexOf('.')+1)];
}
- if (!Module["preloadPlugins"]) Module["preloadPlugins"] = [];
-
var imagePlugin = {};
imagePlugin['canHandle'] = function(name) {
return !Module.noImageDecoding && /\.(jpg|jpeg|png|bmp)$/.exec(name);