mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Make Promise::new take a &GlobalScope
This commit is contained in:
parent
a8c05c6962
commit
ac5a4adf5f
5 changed files with 11 additions and 9 deletions
|
@ -42,7 +42,7 @@ pub enum FetchedData {
|
|||
// https://fetch.spec.whatwg.org/#concept-body-consume-body
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn consume_body<T: BodyOperations + Reflectable>(object: &T, body_type: BodyType) -> Rc<Promise> {
|
||||
let promise = Promise::new(object.global().r());
|
||||
let promise = Promise::new(&object.global_scope());
|
||||
|
||||
// Step 1
|
||||
if object.get_body_used() || object.is_locked() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue