emscripten-core / emscripten-core/emscripten
postabmble.js generated code run(args): the args not take in effect
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
the generated code use emcc 1.39.18 is below:
```
...
function run(args) {
args = args || arguments_;
if (runDependencies > 0) {
return
}
preRun();
if (runDependencies > 0) return;
function doRun() {
if (calledRun) return;
calledRun = true;
Module["calledRun"] = true;
if (ABORT) return;
initRuntime();
preMain();
if (Module["onRuntimeInitialized"]) Module["onRuntimeInitialized"]();
if (shouldRunNow) callMain(args);
postRun()
}
if (Module["setStatus"]) {
Module["setStatus"]("Running...");
setTimeout(function() {
setTimeout(function() {
Module["setStatus"]("")
}, 1);
doRun()
}, 1)
} else {
doRun()
}
}
Module["run"] = run;
```
when I run `Module['run'](someargs)`, the someargs seems not used in the process execution.
it works when I set the global variable `arguments_` like this:
```
arguments_[0]= '0';
arguments_[1]= myJson.result;
Module.run();
```
Is there I wrong with something?
Contributor guide
Assessment
This issue has not been assessed yet.