aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_thread.rs
diff options
context:
space:
mode:
authorRavi Shankar <wafflespeanut@gmail.com>2016-01-01 00:01:24 +0530
committerJosh Matthews <josh@joshmatthews.net>2016-04-20 12:38:35 -0400
commit5e6f32a59bcefd15e2a081a65b4ea44161e913f8 (patch)
tree7bb9e9c07e3967a9f13a337b18bcf35895509989 /components/script/script_thread.rs
parent8d988f20c12e0a5267e79650a90310951c66ca77 (diff)
downloadservo-5e6f32a59bcefd15e2a081a65b4ea44161e913f8.tar.gz
servo-5e6f32a59bcefd15e2a081a65b4ea44161e913f8.zip
Propagating the load errors from network loader
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));