From 9ba1d32f9d1b634558805eab352942fd857bbc29 Mon Sep 17 00:00:00 2001 From: Paul Rouget Date: Thu, 13 Jul 2017 09:50:59 +0200 Subject: [PATCH] always call new_pipeline() before add_pending_changes() --- components/constellation/constellation.rs | 33 +++++++++++------------ 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/components/constellation/constellation.rs b/components/constellation/constellation.rs index 17912603e01..c4f7695b96d 100644 --- a/components/constellation/constellation.rs +++ b/components/constellation/constellation.rs @@ -1576,22 +1576,21 @@ impl Constellation }; // Create the new pipeline, attached to the parent and push to pending changes - self.add_pending_change(SessionHistoryChange { - top_level_browsing_context_id: load_info.info.top_level_browsing_context_id, - browsing_context_id: load_info.info.browsing_context_id, - new_pipeline_id: load_info.info.new_pipeline_id, - load_data: load_data.clone(), - replace_instant: replace_instant, - }); - self.new_pipeline(load_info.info.new_pipeline_id, load_info.info.browsing_context_id, load_info.info.top_level_browsing_context_id, Some((load_info.info.parent_pipeline_id, load_info.info.frame_type)), window_size, - load_data, + load_data.clone(), load_info.sandbox, is_private); + self.add_pending_change(SessionHistoryChange { + top_level_browsing_context_id: load_info.info.top_level_browsing_context_id, + browsing_context_id: load_info.info.browsing_context_id, + new_pipeline_id: load_info.info.new_pipeline_id, + load_data: load_data, + replace_instant: replace_instant, + }); } fn handle_script_new_iframe(&mut self, @@ -1792,21 +1791,21 @@ impl Constellation let new_pipeline_id = PipelineId::new(); let sandbox = IFrameSandboxState::IFrameUnsandboxed; let replace_instant = if replace { Some(timestamp) } else { None }; - self.add_pending_change(SessionHistoryChange { - top_level_browsing_context_id: top_level_id, - browsing_context_id: browsing_context_id, - new_pipeline_id: new_pipeline_id, - load_data: load_data.clone(), - replace_instant: replace_instant, - }); self.new_pipeline(new_pipeline_id, browsing_context_id, top_level_id, None, window_size, - load_data, + load_data.clone(), sandbox, false); + self.add_pending_change(SessionHistoryChange { + top_level_browsing_context_id: top_level_id, + browsing_context_id: browsing_context_id, + new_pipeline_id: new_pipeline_id, + load_data: load_data, + replace_instant: replace_instant, + }); Some(new_pipeline_id) } }