Call Module.ensureInitialized(name) to make sure calling APIs is safe

This commit is contained in:
Cameron Lowell Palmer 2018-02-07 15:43:15 +01:00
parent 1b14d653c2
commit 078cd04dce
1 changed files with 3 additions and 1 deletions

View File

@ -193,6 +193,7 @@ function dumpModule(name) {
if (modules == null) { if (modules == null) {
modules = getAllAppModules(); modules = getAllAppModules();
} }
var targetmod = null; var targetmod = null;
for (var i = 0; i < modules.length; i++) { for (var i = 0; i < modules.length; i++) {
if (modules[i].path.indexOf(name) != -1) { if (modules[i].path.indexOf(name) != -1) {
@ -207,7 +208,8 @@ function dumpModule(name) {
var modbase = modules[i].base; var modbase = modules[i].base;
var modsize = modules[i].size; var modsize = modules[i].size;
var newmodname = modules[i].name; var newmodname = modules[i].name;
var newmodpath = getDocumentDir() + "/" + newmodname; Module.ensureInitialized(newmodname);
var newmodpath = getDocumentDir() + "/" + newmodname + ".fid";
var oldmodpath = modules[i].path; var oldmodpath = modules[i].path;