aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
diff options
context:
space:
mode:
Diffstat (limited to 'components/script')
-rw-r--r--components/script/document_loader.rs4
-rw-r--r--components/script/dom/document.rs6
2 files changed, 2 insertions, 8 deletions
diff --git a/components/script/document_loader.rs b/components/script/document_loader.rs
index 65f5ddf55af..f56e5c54a9d 100644
--- a/components/script/document_loader.rs
+++ b/components/script/document_loader.rs
@@ -63,7 +63,7 @@ pub struct LoadBlocker {
impl LoadBlocker {
/// Mark the document's load event as blocked on this new load.
pub fn new(doc: &Document, load: LoadType) -> LoadBlocker {
- doc.add_blocking_load(load.clone());
+ doc.mut_loader().add_blocking_load(load.clone());
LoadBlocker {
doc: JS::from_ref(doc),
load: Some(load),
@@ -119,7 +119,7 @@ impl DocumentLoader {
}
/// Add a load to the list of blocking loads.
- pub fn add_blocking_load(&mut self, load: LoadType) {
+ fn add_blocking_load(&mut self, load: LoadType) {
self.blocking_loads.push(load);
}
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs
index a765f767f2d..f8238d645e1 100644
--- a/components/script/dom/document.rs
+++ b/components/script/dom/document.rs
@@ -1423,12 +1423,6 @@ impl Document {
ReflowReason::RequestAnimationFrame);
}
- /// Add a load to the list of loads blocking this document's load.
- pub fn add_blocking_load(&self, load: LoadType) {
- let mut loader = self.loader.borrow_mut();
- loader.add_blocking_load(load)
- }
-
pub fn load_async(&self, load: LoadType, listener: AsyncResponseTarget, referrer_policy: Option<ReferrerPolicy>) {
let mut loader = self.loader.borrow_mut();
loader.load_async(load, listener, self, referrer_policy);