Skip to content

Commit feee2e6

Browse files
authored
Merge pull request #6178 from juj/remove_library_fetch_init_dependency_on_idb_failure
remove_library_fetch_init_dependency_on_idb_failure
2 parents e1f53a2 + f678d8a commit feee2e6

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/Fetch.js

+4-6
Original file line numberDiff line numberDiff line change
@@ -81,27 +81,25 @@ var Fetch = {
8181
#endif
8282
Fetch.dbInstance = db;
8383

84-
#if USE_PTHREADS
8584
if (isMainThread) {
85+
#if USE_PTHREADS
8686
if (typeof SharedArrayBuffer !== 'undefined') Fetch.initFetchWorker();
87+
#endif
8788
removeRunDependency('library_fetch_init');
8889
}
89-
#else
90-
if (typeof ENVIRONMENT_IS_FETCH_WORKER === 'undefined' || !ENVIRONMENT_IS_FETCH_WORKER) removeRunDependency('library_fetch_init');
91-
#endif
9290
};
9391
var onerror = function() {
9492
#if FETCH_DEBUG
9593
console.error('fetch: IndexedDB open failed.');
9694
#endif
9795
Fetch.dbInstance = false;
9896

99-
#if USE_PTHREADS
10097
if (isMainThread) {
98+
#if USE_PTHREADS
10199
if (typeof SharedArrayBuffer !== 'undefined') Fetch.initFetchWorker();
100+
#endif
102101
removeRunDependency('library_fetch_init');
103102
}
104-
#endif
105103
};
106104
Fetch.openDatabase('emscripten_filesystem', 1, onsuccess, onerror);
107105

0 commit comments

Comments
 (0)