Skip to content

Commit 4362ff3

Browse files
author
Max Brunsfeld
authored
Rename loadSideModule back to loadWebAssemblyModule (#12969)
1 parent 0bc69be commit 4362ff3

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/library_browser.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -242,12 +242,12 @@ var LibraryBrowser = {
242242
return !Module.noWasmDecoding && name.endsWith('.so');
243243
};
244244
wasmPlugin['handle'] = function(byteArray, name, onload, onerror) {
245-
// loadSideModule can not load modules out-of-order, so rather
245+
// loadWebAssemblyModule can not load modules out-of-order, so rather
246246
// than just running the promises in parallel, this makes a chain of
247247
// promises to run in series.
248248
this['asyncWasmLoadPromise'] = this['asyncWasmLoadPromise'].then(
249249
function() {
250-
return loadSideModule(byteArray, {loadAsync: true, nodelete: true});
250+
return loadWebAssemblyModule(byteArray, {loadAsync: true, nodelete: true});
251251
}).then(
252252
function(module) {
253253
Module['preloadedWasm'][name] = module;

src/library_dylink.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,8 @@ var LibraryDylink = {
250250

251251
// Loads a side module from binary data. Returns the module's exports or a
252252
// progise that resolves to its exports if the loadAsync flag is set.
253-
$loadSideModule__deps: ['$loadDynamicLibrary', '$createInvokeFunction', '$getMemory', '$relocateExports', '$resolveGlobalSymbol', '$GOTHandler'],
254-
$loadSideModule: function(binary, flags) {
253+
$loadWebAssemblyModule__deps: ['$loadDynamicLibrary', '$createInvokeFunction', '$getMemory', '$relocateExports', '$resolveGlobalSymbol', '$GOTHandler'],
254+
$loadWebAssemblyModule: function(binary, flags) {
255255
var int32View = new Uint32Array(new Uint8Array(binary.subarray(0, 24)).buffer);
256256
assert(int32View[0] == 0x6d736100, 'need to see wasm magic number'); // \0asm
257257
// we should see the dylink section right after the magic number and wasm version
@@ -478,7 +478,7 @@ var LibraryDylink = {
478478
// If a library was already loaded, it is not loaded a second time. However
479479
// flags.global and flags.nodelete are handled every time a load request is made.
480480
// Once a library becomes "global" or "nodelete", it cannot be removed or unloaded.
481-
$loadDynamicLibrary__deps: ['$LDSO', '$loadSideModule', '$asmjsMangle', '$fetchBinary'],
481+
$loadDynamicLibrary__deps: ['$LDSO', '$loadWebAssemblyModule', '$asmjsMangle', '$fetchBinary'],
482482
$loadDynamicLibrary: function(lib, flags) {
483483
if (lib == '__main__' && !LDSO.loadedLibNames[lib]) {
484484
LDSO.loadedLibs[-1] = {
@@ -557,11 +557,11 @@ var LibraryDylink = {
557557
// module not preloaded - load lib data and create new module from it
558558
if (flags.loadAsync) {
559559
return loadLibData(lib).then(function(libData) {
560-
return loadSideModule(libData, flags);
560+
return loadWebAssemblyModule(libData, flags);
561561
});
562562
}
563563

564-
return loadSideModule(loadLibData(lib), flags);
564+
return loadWebAssemblyModule(loadLibData(lib), flags);
565565
}
566566

567567
// Module.symbols <- libModule.symbols (flags.global handler)

0 commit comments

Comments
 (0)