Commit graph

22 commits

Author SHA1 Message Date
Aron Zwaan
e2e6e2ac94 Pass InCompartment by value 2019-04-25 11:37:35 +02:00
Aron Zwaan
1b6949d4cf Add proof parameter to Promise::new_in_current_compartment 2019-04-24 19:46:10 +02:00
Aron Zwaan
60ba3d2573 Fix formatting issues 2019-04-03 20:45:30 +02:00
Aron Zwaan
782b58587a Rename Promise::new to Promise::new_in_current_compartment 2019-04-03 20:45:30 +02:00
Manish Goregaokar
611dc4bc70 Remove now-unnecessary must_root and allow(unrooted_must_root) annotations 2019-01-04 15:05:07 -08:00
Simon Sapin
be69f9c3e6 Rustfmt has changed its default style :/ 2018-12-28 13:17:47 +01:00
Jan Andre Ikenmeyer
a1a14459c1
Update MPL license to https (part 3) 2018-11-19 14:47:12 +01:00
Agustin Chiappe Berrini
75eb94afca Unify the task source and task canceller API
I moved away from the `Window` struct all the logic to handle task
sources, into a new struct called `TaskManager`. In a happy world, I'd
be able to just have there two functions, of the types:

```rust
fn task_source<T: TaskSource>(&self, name: TaskSourceName) -> Box<T>
fn task_source_with_canceller<T: TaskSource>(&self, name: TaskSourceName)
  -> (Box<T>, TaskSourceCanceller)
```

And not so much duplicated code. However, because TaskSource can't be a
trait object (because it has generic type parameters), that's not
possible. Instead, I decided to reduce duplicated logic through macros.

For reasons[1], I have to pass both the name of the function with
canceller and the name of the function without, as I'm not able to
concatenate them in the macro itself. I could probably use
`concat_idents` to create both types already defined and reduce the
amount of arguments by one, but that macro is nightly only. At the same
time, not being able to declare macros inside `impl` forces me to pass
`self` as an argument.

All this makes this solution more verbose than it would be ideally. It
does reduce duplication, but it doesn't reduce the size of the file.

[1](https://github.com/rust-lang/rust/issues/29599)
2018-11-14 06:36:44 -05:00
Pyfisch
9e92eb205a Reorder imports 2018-11-06 22:35:07 +01:00
Simon Sapin
76e59a46d3 Sort use statements 2018-11-06 15:26:02 +01:00
Simon Sapin
45f7199eee cargo fix --edition 2018-11-06 15:26:02 +01:00
chansuke
c37a345dc9 Format script component 2018-09-19 17:40:47 -04:00
Manish Goregaokar
2c19814bec 48000 -> 44100 2018-07-30 16:42:38 -07:00
Fernando Jiménez Moreno
6aaf5806b1 OfflineAudioContext 2018-07-30 14:23:48 +02:00
Fernando Jiménez Moreno
21cb160be3 test-tidy fixes 2018-07-30 14:21:48 +02:00
Fernando Jiménez Moreno
b26a3bd31b rustfmt 2018-07-30 14:21:46 +02:00
Fernando Jiménez Moreno
1c2d872e33 Workaround resume issues 2018-07-30 14:21:40 +02:00
Fernando Jiménez Moreno
aed57252b1 Properly implement audio context state changes 2018-07-30 14:21:39 +02:00
Fernando Jiménez Moreno
9f15bdd6cc AudioContext.suspend() implementation 2018-07-30 14:21:39 +02:00
Fernando Jiménez Moreno
98741ddf84 AudioContext construction 2018-07-30 14:21:38 +02:00
Fernando Jiménez Moreno
db52d1f65c Audio context options 2018-07-30 14:21:38 +02:00
Fernando Jiménez Moreno
7ee42e4223 Initial WebAudio API stubs 2018-07-30 14:21:36 +02:00