From 078cd04dce4d5748232801828a9163cd72e9642b Mon Sep 17 00:00:00 2001 From: Cameron Lowell Palmer Date: Wed, 7 Feb 2018 15:43:15 +0100 Subject: [PATCH] Call Module.ensureInitialized(name) to make sure calling APIs is safe --- dump.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dump.js b/dump.js index 4c48062..cc04abe 100644 --- a/dump.js +++ b/dump.js @@ -193,6 +193,7 @@ function dumpModule(name) { if (modules == null) { modules = getAllAppModules(); } + var targetmod = null; for (var i = 0; i < modules.length; i++) { if (modules[i].path.indexOf(name) != -1) { @@ -207,7 +208,8 @@ function dumpModule(name) { var modbase = modules[i].base; var modsize = modules[i].size; var newmodname = modules[i].name; - var newmodpath = getDocumentDir() + "/" + newmodname; + Module.ensureInitialized(newmodname); + var newmodpath = getDocumentDir() + "/" + newmodname + ".fid"; var oldmodpath = modules[i].path;