aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_thread.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/script_thread.rs')
-rw-r--r--components/script/script_thread.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs
index 78c9aefc409..d076701a9f5 100644
--- a/components/script/script_thread.rs
+++ b/components/script/script_thread.rs
@@ -492,7 +492,7 @@ pub unsafe extern "C" fn shadow_check_callback(_cx: *mut JSContext,
}
impl ScriptThread {
- pub fn page_fetch_complete(id: PipelineId, subpage: Option<SubpageId>, metadata: Metadata)
+ pub fn page_fetch_complete(id: PipelineId, subpage: Option<SubpageId>, metadata: Option<Metadata>)
-> Option<ParserRoot> {
SCRIPT_THREAD_ROOT.with(|root| {
let script_thread = unsafe { &*root.borrow().unwrap() };
@@ -1280,7 +1280,7 @@ impl ScriptThread {
/// We have received notification that the response associated with a load has completed.
/// Kick off the document and frame tree creation process using the result.
fn handle_page_fetch_complete(&self, id: PipelineId, subpage: Option<SubpageId>,
- metadata: Metadata) -> Option<ParserRoot> {
+ metadata: Option<Metadata>) -> Option<ParserRoot> {
let idx = self.incomplete_loads.borrow().iter().position(|load| {
load.pipeline_id == id && load.parent_info.map(|info| info.1) == subpage
});
@@ -1289,7 +1289,7 @@ impl ScriptThread {
match idx {
Some(idx) => {
let load = self.incomplete_loads.borrow_mut().remove(idx);
- Some(self.load(metadata, load))
+ metadata.map(|meta| self.load(meta, load))
}
None => {
assert!(self.closed_pipelines.borrow().contains(&id));