Skip to content

Commit aa461c3

Browse files
authored
Add one more webkit-specific whitelist in web-sys (#1865)
* Add one more webkit-specific whitelist in web-sys * Run rustfmt
1 parent db9d603 commit aa461c3

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

crates/cli-support/src/js/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,10 +465,12 @@ impl<'a> Context<'a> {
465465
};
466466

467467
let default_module_path = match self.config.mode {
468-
OutputMode::Web => "\
468+
OutputMode::Web => {
469+
"\
469470
if (typeof module === 'undefined') {
470471
module = import.meta.url.replace(/\\.js$/, '_bg.wasm');
471-
}",
472+
}"
473+
}
472474
_ => "",
473475
};
474476

crates/cli/tests/wasm-bindgen/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ fn empty_interface_types() {
206206
r#"
207207
#[no_mangle]
208208
pub extern fn foo() {}
209-
"#
209+
"#,
210210
)
211211
.file(
212212
"Cargo.toml",

crates/futures/src/task/multithread.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ impl Task {
130130
// resources associated with the future ASAP.
131131
Poll::Ready(()) => {
132132
*borrow = None;
133-
},
133+
}
134134

135135
// Unlike `singlethread.rs` we are responsible for ensuring there's
136136
// a closure to handle the notification that a Future is ready. In

crates/webidl/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ impl<'src> FirstPassRecord<'src> {
568568

569569
// whitelist a few names that have known polyfills
570570
match name {
571-
"AudioContext" => {
571+
"AudioContext" | "OfflineAudioContext" => {
572572
import_type
573573
.vendor_prefixes
574574
.push(Ident::new("webkit", Span::call_site()));

0 commit comments

Comments
 (0)