mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Replace CanGc::note() with arguments passed by callers (#33917)
Signed-off-by: Wulan Seruniati Salim <lauwwulan1806@gmail.com> remove not necessary comment Co-authored-by: Wulan Seruniati Salim <lauwwulan1806@gmail.com>
This commit is contained in:
parent
a57b6a3f79
commit
a14b65f30b
3 changed files with 6 additions and 10 deletions
|
@ -810,7 +810,7 @@ fn run_package_data_algorithm(
|
||||||
BodyType::Text => run_text_data_algorithm(bytes),
|
BodyType::Text => run_text_data_algorithm(bytes),
|
||||||
BodyType::Json => run_json_data_algorithm(cx, bytes),
|
BodyType::Json => run_json_data_algorithm(cx, bytes),
|
||||||
BodyType::Blob => run_blob_data_algorithm(&global, bytes, mime, can_gc),
|
BodyType::Blob => run_blob_data_algorithm(&global, bytes, mime, can_gc),
|
||||||
BodyType::FormData => run_form_data_algorithm(&global, bytes, mime),
|
BodyType::FormData => run_form_data_algorithm(&global, bytes, mime, can_gc),
|
||||||
BodyType::ArrayBuffer => run_array_buffer_data_algorithm(cx, bytes),
|
BodyType::ArrayBuffer => run_array_buffer_data_algorithm(cx, bytes),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -868,6 +868,7 @@ fn run_form_data_algorithm(
|
||||||
root: &GlobalScope,
|
root: &GlobalScope,
|
||||||
bytes: Vec<u8>,
|
bytes: Vec<u8>,
|
||||||
mime: &[u8],
|
mime: &[u8],
|
||||||
|
can_gc: CanGc,
|
||||||
) -> Fallible<FetchedData> {
|
) -> Fallible<FetchedData> {
|
||||||
let mime_str = if let Ok(s) = str::from_utf8(mime) {
|
let mime_str = if let Ok(s) = str::from_utf8(mime) {
|
||||||
s
|
s
|
||||||
|
@ -883,7 +884,7 @@ fn run_form_data_algorithm(
|
||||||
// ... is not fully determined yet.
|
// ... is not fully determined yet.
|
||||||
if mime.type_() == mime::APPLICATION && mime.subtype() == mime::WWW_FORM_URLENCODED {
|
if mime.type_() == mime::APPLICATION && mime.subtype() == mime::WWW_FORM_URLENCODED {
|
||||||
let entries = form_urlencoded::parse(&bytes);
|
let entries = form_urlencoded::parse(&bytes);
|
||||||
let formdata = FormData::new(None, root, CanGc::note());
|
let formdata = FormData::new(None, root, can_gc);
|
||||||
for (k, e) in entries {
|
for (k, e) in entries {
|
||||||
formdata.Append(USVString(k.into_owned()), USVString(e.into_owned()));
|
formdata.Append(USVString(k.into_owned()), USVString(e.into_owned()));
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,16 +49,10 @@ impl XRReferenceSpaceEvent {
|
||||||
cancelable: bool,
|
cancelable: bool,
|
||||||
space: &XRReferenceSpace,
|
space: &XRReferenceSpace,
|
||||||
transform: Option<&XRRigidTransform>,
|
transform: Option<&XRRigidTransform>,
|
||||||
|
can_gc: CanGc,
|
||||||
) -> DomRoot<XRReferenceSpaceEvent> {
|
) -> DomRoot<XRReferenceSpaceEvent> {
|
||||||
Self::new_with_proto(
|
Self::new_with_proto(
|
||||||
global,
|
global, None, type_, bubbles, cancelable, space, transform, can_gc,
|
||||||
None,
|
|
||||||
type_,
|
|
||||||
bubbles,
|
|
||||||
cancelable,
|
|
||||||
space,
|
|
||||||
transform,
|
|
||||||
CanGc::note(),
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -409,6 +409,7 @@ impl XRSession {
|
||||||
false,
|
false,
|
||||||
space,
|
space,
|
||||||
Some(&*offset),
|
Some(&*offset),
|
||||||
|
can_gc,
|
||||||
);
|
);
|
||||||
event.upcast::<Event>().fire(space.upcast());
|
event.upcast::<Event>().fire(space.upcast());
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue