@@ -472,7 +472,7 @@ public void run() {
472
472
staticConfiguration .logger .write ("Worker (id=" + workerId + ")'s Runtime is initializing!" );
473
473
}
474
474
475
- Runtime runtime = initRuntime (dynamicConfiguration , appDir );
475
+ Runtime runtime = initRuntime (dynamicConfiguration );
476
476
477
477
if (staticConfiguration .logger .isEnabled ()) {
478
478
staticConfiguration .logger .write ("Worker (id=" + workerId + ")'s Runtime initialized!" );
@@ -577,11 +577,11 @@ else if (msg.arg1 == MessageType.BubbleUpException) {
577
577
This method initializes the runtime and should always be called first and through the main thread
578
578
in order to set static configuration that all following workers can use
579
579
*/
580
- public static Runtime initializeRuntimeWithConfiguration (StaticConfiguration config , String appDir ) {
580
+ public static Runtime initializeRuntimeWithConfiguration (StaticConfiguration config ) {
581
581
staticConfiguration = config ;
582
582
WorkThreadScheduler mainThreadScheduler = new WorkThreadScheduler (new MainThreadHandler (Looper .myLooper ()));
583
583
DynamicConfiguration dynamicConfiguration = new DynamicConfiguration (0 , mainThreadScheduler , null );
584
- Runtime runtime = initRuntime (dynamicConfiguration , appDir );
584
+ Runtime runtime = initRuntime (dynamicConfiguration );
585
585
return runtime ;
586
586
}
587
587
@@ -605,10 +605,10 @@ public static void initWorker(String jsFileName, String callingJsDir, int id) {
605
605
This method deals with initializing the runtime with given configuration
606
606
Does it for both workers and for the main thread
607
607
*/
608
- private static Runtime initRuntime (DynamicConfiguration dynamicConfiguration , String appDir ) {
608
+ private static Runtime initRuntime (DynamicConfiguration dynamicConfiguration ) {
609
609
Runtime runtime = new Runtime (staticConfiguration , dynamicConfiguration );
610
610
runtime .init ();
611
- runtime .runScript (new File (appDir , "internal/ts_helpers.js" ));
611
+ runtime .runScript (new File (staticConfiguration . appDir , "internal/ts_helpers.js" ));
612
612
613
613
return runtime ;
614
614
}
0 commit comments