mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Various CanGc fixes in 8 files (#33893)
* Various CanGc fixes in 8 files Signed-off-by: L Ashwin B <lashwinib@gmail.com> * fixed merge conflicts and formatting Signed-off-by: L Ashwin B <lashwinib@gmail.com> --------- Signed-off-by: L Ashwin B <lashwinib@gmail.com>
This commit is contained in:
parent
6b87ecc291
commit
fde8d72aca
13 changed files with 77 additions and 58 deletions
|
@ -113,7 +113,7 @@ impl BodyMixin for Response {
|
|||
self.body_stream.get()
|
||||
}
|
||||
|
||||
fn get_mime_type(&self) -> Vec<u8> {
|
||||
fn get_mime_type(&self, _can_gc: CanGc) -> Vec<u8> {
|
||||
let headers = self.Headers();
|
||||
headers.extract_mime_type()
|
||||
}
|
||||
|
@ -358,28 +358,28 @@ impl ResponseMethods for Response {
|
|||
}
|
||||
|
||||
// https://fetch.spec.whatwg.org/#dom-body-text
|
||||
fn Text(&self) -> Rc<Promise> {
|
||||
consume_body(self, BodyType::Text)
|
||||
fn Text(&self, can_gc: CanGc) -> Rc<Promise> {
|
||||
consume_body(self, BodyType::Text, can_gc)
|
||||
}
|
||||
|
||||
// https://fetch.spec.whatwg.org/#dom-body-blob
|
||||
fn Blob(&self) -> Rc<Promise> {
|
||||
consume_body(self, BodyType::Blob)
|
||||
fn Blob(&self, can_gc: CanGc) -> Rc<Promise> {
|
||||
consume_body(self, BodyType::Blob, can_gc)
|
||||
}
|
||||
|
||||
// https://fetch.spec.whatwg.org/#dom-body-formdata
|
||||
fn FormData(&self) -> Rc<Promise> {
|
||||
consume_body(self, BodyType::FormData)
|
||||
fn FormData(&self, can_gc: CanGc) -> Rc<Promise> {
|
||||
consume_body(self, BodyType::FormData, can_gc)
|
||||
}
|
||||
|
||||
// https://fetch.spec.whatwg.org/#dom-body-json
|
||||
fn Json(&self) -> Rc<Promise> {
|
||||
consume_body(self, BodyType::Json)
|
||||
fn Json(&self, can_gc: CanGc) -> Rc<Promise> {
|
||||
consume_body(self, BodyType::Json, can_gc)
|
||||
}
|
||||
|
||||
// https://fetch.spec.whatwg.org/#dom-body-arraybuffer
|
||||
fn ArrayBuffer(&self) -> Rc<Promise> {
|
||||
consume_body(self, BodyType::ArrayBuffer)
|
||||
fn ArrayBuffer(&self, can_gc: CanGc) -> Rc<Promise> {
|
||||
consume_body(self, BodyType::ArrayBuffer, can_gc)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue