summaryrefslogtreecommitdiff
path: root/core/modules.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-12-20 15:14:19 +0100
committerGitHub <noreply@github.com>2020-12-20 15:14:19 +0100
commit3eec73ff904e54b6e90879d93b09be4330c63712 (patch)
treed1cd44eb9dc1eb9556a6d6ce82da95620b0359fb /core/modules.rs
parente924bbdf3606e83ff9eef3a8ed640c4ecc34444f (diff)
Revert "fix: TLA in web worker (#8809)" (#8839)
This reverts commit e924bbdf3606e83ff9eef3a8ed640c4ecc34444f.
Diffstat (limited to 'core/modules.rs')
-rw-r--r--core/modules.rs14
1 files changed, 6 insertions, 8 deletions
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!(