зеркало из https://github.com/mozilla/pluotsorbet.git
ensure MIDP.midletClassName defined before fs initialization
When we've compiled some classes ahead-of-time, main.js loads after the compiled classes, which can be large and take a long time to load, so fs initialization can race them. But fs initialization depends on MIDP.midletClassName, since it adds an extra directory (tcktestdir) if MIDP.midletClassName is set to RunTests. And MIDP.midletClassName is currently set in main.js, which may not be loaded by the time fs initialization begins. So this change ensures that MIDP.midletClassName is defined before fs initialization begins by setting it in midp.js instead of main.js.
This commit is contained in:
Родитель
dc0ce91200
Коммит
da076442af
1
main.js
1
main.js
|
@ -16,7 +16,6 @@ var APP_BASE_DIR = "./";
|
|||
var jvm = new JVM();
|
||||
|
||||
var main = config.main || "com/sun/midp/main/MIDletSuiteLoader";
|
||||
MIDP.midletClassName = config.midletClassName ? config.midletClassName.replace(/\//g, '.') : "RunTests";
|
||||
|
||||
if ("gamepad" in config && !/no|0/.test(config.gamepad)) {
|
||||
document.documentElement.classList.add('gamepad');
|
||||
|
|
|
@ -8,6 +8,8 @@ var MIDP = {
|
|||
|
||||
MIDP.manifest = {};
|
||||
|
||||
MIDP.midletClassName = config.midletClassName ? config.midletClassName.replace(/\//g, '.') : "RunTests";
|
||||
|
||||
Native["com/sun/midp/jarutil/JarReader.readJarEntry0.(Ljava/lang/String;Ljava/lang/String;)[B"] = function(jar, entryName) {
|
||||
var bytes = CLASSES.loadFileFromJar(util.fromJavaString(jar), util.fromJavaString(entryName));
|
||||
if (!bytes)
|
||||
|
|
Загрузка…
Ссылка в новой задаче