aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/document_loader.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/document_loader.rs')
-rw-r--r--components/script/document_loader.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/components/script/document_loader.rs b/components/script/document_loader.rs
index 2d369697303..0b2a0ab8139 100644
--- a/components/script/document_loader.rs
+++ b/components/script/document_loader.rs
@@ -14,6 +14,7 @@ use servo_url::ServoUrl;
use crate::dom::bindings::root::Dom;
use crate::dom::document::Document;
use crate::fetch::FetchCanceller;
+use crate::script_runtime::CanGc;
#[derive(Clone, Debug, JSTraceable, MallocSizeOf, PartialEq)]
pub enum LoadType {
@@ -48,9 +49,9 @@ impl LoadBlocker {
}
/// Remove this load from the associated document's list of blocking loads.
- pub fn terminate(blocker: &mut Option<LoadBlocker>) {
+ pub fn terminate(blocker: &mut Option<LoadBlocker>, can_gc: CanGc) {
if let Some(this) = blocker.as_mut() {
- this.doc.finish_load(this.load.take().unwrap());
+ this.doc.finish_load(this.load.take().unwrap(), can_gc);
}
*blocker = None;
}
@@ -59,7 +60,7 @@ impl LoadBlocker {
impl Drop for LoadBlocker {
fn drop(&mut self) {
if let Some(load) = self.load.take() {
- self.doc.finish_load(load);
+ self.doc.finish_load(load, CanGc::note());
}
}
}