From 3eec73ff904e54b6e90879d93b09be4330c63712 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sun, 20 Dec 2020 15:14:19 +0100 Subject: Revert "fix: TLA in web worker (#8809)" (#8839) This reverts commit e924bbdf3606e83ff9eef3a8ed640c4ecc34444f. --- core/modules.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'core/modules.rs') diff --git a/core/modules.rs b/core/modules.rs index 8248eb32d..546f2464f 100644 --- a/core/modules.rs +++ b/core/modules.rs @@ -718,8 +718,8 @@ mod tests { let spec = ModuleSpecifier::resolve_url("file:///a.js").unwrap(); let a_id_fut = runtime.load_module(&spec, None); let a_id = futures::executor::block_on(a_id_fut).expect("Failed to load"); - runtime.mod_evaluate(a_id); - futures::executor::block_on(runtime.run_event_loop()).unwrap(); + + futures::executor::block_on(runtime.mod_evaluate(a_id)).unwrap(); let l = loads.lock().unwrap(); assert_eq!( l.to_vec(), @@ -786,8 +786,7 @@ mod tests { let result = runtime.load_module(&spec, None).await; assert!(result.is_ok()); let circular1_id = result.unwrap(); - runtime.mod_evaluate(circular1_id); - runtime.run_event_loop().await.unwrap(); + runtime.mod_evaluate(circular1_id).await.unwrap(); let l = loads.lock().unwrap(); assert_eq!( @@ -864,8 +863,7 @@ mod tests { println!(">> result {:?}", result); assert!(result.is_ok()); let redirect1_id = result.unwrap(); - runtime.mod_evaluate(redirect1_id); - runtime.run_event_loop().await.unwrap(); + runtime.mod_evaluate(redirect1_id).await.unwrap(); let l = loads.lock().unwrap(); assert_eq!( l.to_vec(), @@ -1014,8 +1012,8 @@ mod tests { .boxed_local(); let main_id = futures::executor::block_on(main_id_fut).expect("Failed to load"); - runtime.mod_evaluate(main_id); - futures::executor::block_on(runtime.run_event_loop()).unwrap(); + + futures::executor::block_on(runtime.mod_evaluate(main_id)).unwrap(); let l = loads.lock().unwrap(); assert_eq!( -- cgit v1.2.3