aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/body.rs
diff options
context:
space:
mode:
authorWulan Seruniati Salim <103485830+wulanseruniati@users.noreply.github.com>2024-10-20 15:24:36 +0700
committerGitHub <noreply@github.com>2024-10-20 08:24:36 +0000
commita14b65f30bb3701d7df467406d342752617721ca (patch)
tree66ecab4637858dafcf6b0822aae775d655cebf13 /components/script/body.rs
parenta57b6a3f79314910543024c951d365e55efa154e (diff)
downloadservo-a14b65f30bb3701d7df467406d342752617721ca.tar.gz
servo-a14b65f30bb3701d7df467406d342752617721ca.zip
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>
Diffstat (limited to 'components/script/body.rs')
-rw-r--r--components/script/body.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/components/script/body.rs b/components/script/body.rs
index b2b528e945c..f687903665f 100644
--- a/components/script/body.rs
+++ b/components/script/body.rs
@@ -810,7 +810,7 @@ fn run_package_data_algorithm(
BodyType::Text => run_text_data_algorithm(bytes),
BodyType::Json => run_json_data_algorithm(cx, bytes),
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),
}
}
@@ -868,6 +868,7 @@ fn run_form_data_algorithm(
root: &GlobalScope,
bytes: Vec<u8>,
mime: &[u8],
+ can_gc: CanGc,
) -> Fallible<FetchedData> {
let mime_str = if let Ok(s) = str::from_utf8(mime) {
s
@@ -883,7 +884,7 @@ fn run_form_data_algorithm(
// ... is not fully determined yet.
if mime.type_() == mime::APPLICATION && mime.subtype() == mime::WWW_FORM_URLENCODED {
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 {
formdata.Append(USVString(k.into_owned()), USVString(e.into_owned()));
}