mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-25 19:21:11 +08:00
style: 自动格式化
This commit is contained in:
@@ -175,11 +175,7 @@ pub fn bind_worker(core: &Arc<KernelCore>, session: &KernelSession, global: &mut
|
|||||||
world,
|
world,
|
||||||
global,
|
global,
|
||||||
core,
|
core,
|
||||||
&[(
|
&[("importScripts", crate::worker::bindings::import_scripts as *const (), 1)],
|
||||||
"importScripts",
|
|
||||||
crate::worker::bindings::import_scripts as *const (),
|
|
||||||
1,
|
|
||||||
)],
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
// EventTarget 三方法直绑全局(worker realm 经 self === global 可达;全局原型链
|
// EventTarget 三方法直绑全局(worker realm 经 self === global 可达;全局原型链
|
||||||
|
|||||||
@@ -977,8 +977,7 @@ mod tests {
|
|||||||
let got = global_value_opt(&vm, "got").expect("got 应被设置");
|
let got = global_value_opt(&vm, "got").expect("got 应被设置");
|
||||||
let got_text = vm.lookup_str(got).expect("got 应可读");
|
let got_text = vm.lookup_str(got).expect("got 应可读");
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
got_text,
|
got_text, "7|function|true",
|
||||||
"7|function|true",
|
|
||||||
"lib.js 应同步执行、importScripts 应为 function 且经 self 可达"
|
"lib.js 应同步执行、importScripts 应为 function 且经 self 可达"
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -1072,8 +1071,7 @@ mod tests {
|
|||||||
let got = global_value_opt(&vm, "got").expect("got 应被设置");
|
let got = global_value_opt(&vm, "got").expect("got 应被设置");
|
||||||
let got_text = vm.lookup_str(got).expect("got 应可读");
|
let got_text = vm.lookup_str(got).expect("got 应可读");
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
got_text,
|
got_text, "TypeError|SyntaxError|boom",
|
||||||
"TypeError|SyntaxError|boom",
|
|
||||||
"文件不存在应抛 TypeError、语法错误应抛 SyntaxError、运行期异常应原值透传"
|
"文件不存在应抛 TypeError、语法错误应抛 SyntaxError、运行期异常应原值透传"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user