Skip to content

Commit

Permalink
asm.js synchronous init fix (#5296)
Browse files Browse the repository at this point in the history
  • Loading branch information
buu700 committed Oct 13, 2017
1 parent 42992ef commit 8e45599
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/postamble.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,15 @@ if (memoryInitializer) {
}
function doBrowserLoad() {
Module['readAsync'](memoryInitializer, applyMemoryInitializer, function() {
#if SUPPORT_BASE64_EMBEDDING
var memoryInitializerBytes = tryParseAsDataURI(memoryInitializer);
if (memoryInitializerBytes) {
applyMemoryInitializer(memoryInitializerBytes.buffer);
return;
}
#endif
throw 'could not load memory initializer ' + memoryInitializer;
});
}
#if SUPPORT_BASE64_EMBEDDING
var memoryInitializerBytes = tryParseAsDataURI(memoryInitializer);
if (memoryInitializerBytes) {
applyMemoryInitializer(memoryInitializerBytes.buffer);
} else
#endif
if (Module['memoryInitializerRequest']) {
// a network request has already been created, just use that
function useRequest() {
Expand Down

0 comments on commit 8e45599

Please sign in to comment.