servo: Merge #10489 - Replace use of `debug!` by `warn!` in `constellation.rs` (from timvandermeij:constellation-debug-warn); r=jdm
authorTim van der Meij <timvandermeij@gmail.com>
Thu, 14 Apr 2016 00:20:35 +0500
changeset 338511 2ebe3d32aaf7518f2f4cbeb3eb9deeeb1ae9c589
parent 338510 28ddad5d6dfb6d549e1cf0992d8935b1f65e5ec9
child 338512 a1ce9a2bbe1a4f8196d85f8ac8b2041f778135b5
push id31307
push usergszorc@mozilla.com
push dateSat, 04 Feb 2017 00:59:06 +0000
treeherdermozilla-central@94079d43835f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdm
servo: Merge #10489 - Replace use of `debug!` by `warn!` in `constellation.rs` (from timvandermeij:constellation-debug-warn); r=jdm Fixes #10483. Source-Repo: https://github.com/servo/servo Source-Revision: 628c54948a02b1c947e916fb87b98d00d1e2d537
servo/components/compositing/constellation.rs
--- a/servo/components/compositing/constellation.rs
+++ b/servo/components/compositing/constellation.rs
@@ -260,24 +260,24 @@ impl<'a> Iterator for FrameTreeIterator<
         loop {
             let frame_id = match self.stack.pop() {
                 Some(frame_id) => frame_id,
                 None => return None,
             };
             let frame = match self.frames.get(&frame_id) {
                 Some(frame) => frame,
                 None => {
-                    debug!("Frame {:?} iterated after closure.", frame_id);
+                    warn!("Frame {:?} iterated after closure.", frame_id);
                     continue;
                 },
             };
             let pipeline = match self.pipelines.get(&frame.current) {
                 Some(pipeline) => pipeline,
                 None => {
-                    debug!("Pipeline {:?} iterated after closure.", frame.current);
+                    warn!("Pipeline {:?} iterated after closure.", frame.current);
                     continue;
                 },
             };
             self.stack.extend(pipeline.children.iter().map(|&c| c));
             return Some(frame)
         }
     }
 }
@@ -696,17 +696,17 @@ impl<LTF: LayoutThreadFactory, STF: Scri
             }
             // Update pipeline url after redirections
             Request::Script(FromScriptMsg::SetFinalUrl(pipeline_id, final_url)) => {
                 // The script may have finished loading after we already started shutting down.
                 if let Some(ref mut pipeline) = self.pipelines.get_mut(&pipeline_id) {
                     debug!("constellation got set final url message");
                     pipeline.url = final_url;
                 } else {
-                    debug!("constellation got set final url message for dead pipeline");
+                    warn!("constellation got set final url message for dead pipeline");
                 }
             }
             Request::Script(FromScriptMsg::MozBrowserEvent(pipeline_id,
                                               subpage_id,
                                               event)) => {
                 debug!("constellation got mozbrowser event message");
                 self.handle_mozbrowser_event_msg(pipeline_id,
                                                  subpage_id,
@@ -730,34 +730,34 @@ impl<LTF: LayoutThreadFactory, STF: Scri
                 self.pipelines.get(&pipeline_id)
                     .and_then(|pipeline| pipeline.script_chan.send(msg).ok())
                     .unwrap_or_else(|| self.handle_send_error(pipeline_id));
             }
             Request::Script(FromScriptMsg::GetClipboardContents(sender)) => {
                 let result = self.clipboard_ctx.as_ref().map_or(
                     "".to_owned(),
                     |ctx| ctx.get_contents().unwrap_or_else(|e| {
-                        debug!("Error getting clipboard contents ({}), defaulting to empty string", e);
+                        warn!("Error getting clipboard contents ({}), defaulting to empty string", e);
                         "".to_owned()
                     })
                 );
-                sender.send(result).unwrap_or_else(|e| debug!("Failed to send clipboard ({})", e))
+                sender.send(result).unwrap_or_else(|e| warn!("Failed to send clipboard ({})", e))
             }
             Request::Script(FromScriptMsg::SetClipboardContents(s)) => {
                 if let Some(ref mut ctx) = self.clipboard_ctx {
                     if let Err(e) = ctx.set_contents(s) {
-                        debug!("Error setting clipboard contents ({})", e);
+                        warn!("Error setting clipboard contents ({})", e);
                     }
                 }
             }
             Request::Script(FromScriptMsg::RemoveIFrame(pipeline_id, sender)) => {
                 debug!("constellation got remove iframe message");
                 self.handle_remove_iframe_msg(pipeline_id);
                 if let Some(sender) = sender {
-                    sender.send(()).unwrap_or_else(|e| debug!("Error replying to remove iframe ({})", e));
+                    sender.send(()).unwrap_or_else(|e| warn!("Error replying to remove iframe ({})", e));
                 }
             }
             Request::Script(FromScriptMsg::NewFavicon(url)) => {
                 debug!("constellation got new favicon message");
                 self.compositor_proxy.send(ToCompositorMsg::NewFavicon(url));
             }
             Request::Script(FromScriptMsg::HeadParsed) => {
                 debug!("constellation got head parsed message");
@@ -813,30 +813,30 @@ impl<LTF: LayoutThreadFactory, STF: Scri
     }
 
     fn handle_exit(&mut self) {
         for (_id, ref pipeline) in &self.pipelines {
             pipeline.exit();
         }
         self.image_cache_thread.exit();
         self.resource_thread.send(net_traits::ControlMsg::Exit)
-            .unwrap_or_else(|e| debug!("Exit resource thread failed ({})", e));
+            .unwrap_or_else(|e| warn!("Exit resource thread failed ({})", e));
         self.devtools_chan.as_ref().map(|chan| {
             chan.send(DevtoolsControlMsg::FromChrome(ChromeToDevtoolsControlMsg::ServerExitMsg))
-                .unwrap_or_else(|e| debug!("Exit devtools failed ({})", e));
+                .unwrap_or_else(|e| warn!("Exit devtools failed ({})", e));
         });
         self.storage_thread.send(StorageThreadMsg::Exit)
-            .unwrap_or_else(|e| debug!("Exit storage thread failed ({})", e));
+            .unwrap_or_else(|e| warn!("Exit storage thread failed ({})", e));
         self.font_cache_thread.exit();
         self.compositor_proxy.send(ToCompositorMsg::ShutdownComplete);
     }
 
     fn handle_send_error(&mut self, pipeline_id: PipelineId) {
         let parent_info = match self.pipelines.get(&pipeline_id) {
-            None => return debug!("Pipeline {:?} send error after closure.", pipeline_id),
+            None => return warn!("Pipeline {:?} send error after closure.", pipeline_id),
             Some(pipeline) => pipeline.parent_info,
         };
         // Treat send error the same as receiving a failure message
         self.handle_failure_msg(pipeline_id, parent_info);
     }
 
     fn handle_failure_msg(&mut self,
                           pipeline_id: PipelineId,
@@ -852,21 +852,21 @@ impl<LTF: LayoutThreadFactory, STF: Scri
 
         let window_size = self.pipelines.get(&pipeline_id).and_then(|pipeline| pipeline.size);
 
         self.close_pipeline(pipeline_id, ExitPipelineMode::Force);
 
         while let Some(pending_pipeline_id) = self.pending_frames.iter().find(|pending| {
             pending.old_pipeline_id == Some(pipeline_id)
         }).map(|frame| frame.new_pipeline_id) {
-            debug!("removing pending frame change for failed pipeline");
+            warn!("removing pending frame change for failed pipeline");
             self.close_pipeline(pending_pipeline_id, ExitPipelineMode::Force);
         }
 
-        debug!("creating replacement pipeline for about:failure");
+        warn!("creating replacement pipeline for about:failure");
 
         let new_pipeline_id = PipelineId::new();
         self.new_pipeline(new_pipeline_id,
                           parent_info,
                           window_size,
                           None,
                           LoadData::new(url!("about:failure")));
 
@@ -906,25 +906,25 @@ impl<LTF: LayoutThreadFactory, STF: Scri
             initial_viewport: *size * ScaleFactor::new(1.0),
             device_pixel_ratio: self.window_size.device_pixel_ratio,
         })).unwrap_or_else(|_| self.handle_send_error(pipeline_id));
     }
 
     fn handle_subframe_loaded(&mut self, pipeline_id: PipelineId) {
         let parent_info = match self.pipelines.get(&pipeline_id) {
             Some(pipeline) => pipeline.parent_info,
-            None => return debug!("Pipeline {:?} loaded after closure.", pipeline_id),
+            None => return warn!("Pipeline {:?} loaded after closure.", pipeline_id),
         };
         let subframe_parent_id = match parent_info {
             Some(ref parent) => parent.0,
-            None => return debug!("Pipeline {:?} has no parent.", pipeline_id),
+            None => return warn!("Pipeline {:?} has no parent.", pipeline_id),
         };
         let script_chan = match self.pipelines.get(&subframe_parent_id) {
             Some(pipeline) => pipeline.script_chan.clone(),
-            None => return debug!("Pipeline {:?} subframe loaded after closure.", subframe_parent_id),
+            None => return warn!("Pipeline {:?} subframe loaded after closure.", subframe_parent_id),
         };
         let msg = ConstellationControlMsg::DispatchFrameLoadEvent {
             target: pipeline_id,
             parent: subframe_parent_id,
         };
         script_chan.send(msg).unwrap_or_else(|_| self.handle_send_error(subframe_parent_id));
     }
 
@@ -1005,17 +1005,17 @@ impl<LTF: LayoutThreadFactory, STF: Scri
                                               animation_state: AnimationState) {
         self.compositor_proxy.send(ToCompositorMsg::ChangeRunningAnimationsState(pipeline_id,
                                                                                animation_state))
     }
 
     fn handle_tick_animation(&mut self, pipeline_id: PipelineId, tick_type: AnimationTickType) {
         let (layout_chan, script_chan) = match self.pipelines.get(&pipeline_id) {
             Some(pipeline) => (pipeline.layout_chan.0.clone(), pipeline.script_chan.clone()),
-            None => return debug!("Pipeline {:?} got tick after closure.", pipeline_id),
+            None => return warn!("Pipeline {:?} got tick after closure.", pipeline_id),
         };
         match tick_type {
             AnimationTickType::Script => {
                 script_chan
                     .send(ConstellationControlMsg::TickAllAnimations(pipeline_id))
                     .unwrap_or_else(|_| self.handle_send_error(pipeline_id));
             }
             AnimationTickType::Layout => {
@@ -1046,17 +1046,17 @@ impl<LTF: LayoutThreadFactory, STF: Scri
             Some((parent_pipeline_id, subpage_id)) => {
                 self.handle_load_start_msg(&source_id);
                 // Message the constellation to find the script thread for this iframe
                 // and issue an iframe load through there.
                 let msg = ConstellationControlMsg::Navigate(parent_pipeline_id, subpage_id, load_data);
                 let script_chan = match self.pipelines.get(&parent_pipeline_id) {
                     Some(parent_pipeline) => parent_pipeline.script_chan.clone(),
                     None => {
-                        debug!("Pipeline {:?} child loaded after closure", parent_pipeline_id);
+                        warn!("Pipeline {:?} child loaded after closure", parent_pipeline_id);
                         return None;
                     },
                 };
                 script_chan.send(msg).unwrap_or_else(|_| self.handle_send_error(parent_pipeline_id));
                 Some(source_id)
             }
             None => {
                 // Make sure no pending page would be overridden.
@@ -1082,17 +1082,17 @@ impl<LTF: LayoutThreadFactory, STF: Scri
                 // Create the new pipeline
                 let new_pipeline_id = PipelineId::new();
                 self.new_pipeline(new_pipeline_id, None, window_size, None, load_data);
                 self.push_pending_frame(new_pipeline_id, Some(source_id));
 
                 // Send message to ScriptThread that will suspend all timers
                 match self.pipelines.get(&source_id) {
                     Some(source) => source.freeze(),
-                    None => debug!("Pipeline {:?} loaded after closure", source_id),
+                    None => warn!("Pipeline {:?} loaded after closure", source_id),
                 };
                 Some(new_pipeline_id)
             }
         }
     }
 
     fn handle_load_start_msg(&mut self, pipeline_id: &PipelineId) {
         if let Some(frame_id) = self.pipeline_to_frame_map.get(pipeline_id) {
@@ -1142,60 +1142,60 @@ impl<LTF: LayoutThreadFactory, STF: Scri
             .and_then(|info| self.subpage_map.get(&info))
             .and_then(|pipeline_id| self.pipeline_to_frame_map.get(&pipeline_id))
             .cloned()
             .or(self.root_frame_id);
 
         // If the frame_id lookup fails, then we are in the middle of tearing down
         // the root frame, so it is reasonable to silently ignore the navigation.
         let frame_id = match frame_id {
-            None => return debug!("Navigation after root's closure."),
+            None => return warn!("Navigation after root's closure."),
             Some(frame_id) => frame_id,
         };
 
         // Check if the currently focused pipeline is the pipeline being replaced
         // (or a child of it). This has to be done here, before the current
         // frame tree is modified below.
         let update_focus_pipeline = self.focused_pipeline_in_tree(frame_id);
 
         // Get the ids for the previous and next pipelines.
         let (prev_pipeline_id, next_pipeline_id) = match self.frames.get_mut(&frame_id) {
             Some(frame) => {
                 let next = match direction {
                     NavigationDirection::Forward => {
                         match frame.next.pop() {
                             None => {
-                                debug!("no next page to navigate to");
+                                warn!("no next page to navigate to");
                                 return;
                             },
                             Some(next) => {
                                 frame.prev.push(frame.current);
                                 next
                             },
                         }
                     }
                     NavigationDirection::Back => {
                         match frame.prev.pop() {
                             None => {
-                                debug!("no previous page to navigate to");
+                                warn!("no previous page to navigate to");
                                 return;
                             },
                             Some(prev) => {
                                 frame.next.push(frame.current);
                                 prev
                             },
                         }
                     }
                 };
                 let prev = frame.current;
                 frame.current = next;
                 (prev, next)
             },
             None => {
-                debug!("no frame to navigate from");
+                warn!("no frame to navigate from");
                 return;
             },
         };
 
         // If the currently focused pipeline is the one being changed (or a child
         // of the pipeline being changed) then update the focus pipeline to be
         // the replacement.
         if update_focus_pipeline {
@@ -1213,23 +1213,23 @@ impl<LTF: LayoutThreadFactory, STF: Scri
         // Set paint permissions correctly for the compositor layers.
         self.revoke_paint_permission(prev_pipeline_id);
         self.send_frame_tree_and_grant_paint_permission();
 
         // Update the owning iframe to point to the new subpage id.
         // This makes things like contentDocument work correctly.
         if let Some((parent_pipeline_id, subpage_id)) = pipeline_info {
             let script_chan = match self.pipelines.get(&parent_pipeline_id) {
-                None => return debug!("Pipeline {:?} child navigated after closure.", parent_pipeline_id),
+                None => return warn!("Pipeline {:?} child navigated after closure.", parent_pipeline_id),
                 Some(pipeline) => pipeline.script_chan.clone(),
             };
             let new_subpage_id = match self.pipelines.get(&next_pipeline_id) {
-                None => return debug!("Pipeline {:?} navigated to after closure.", next_pipeline_id),
+                None => return warn!("Pipeline {:?} navigated to after closure.", next_pipeline_id),
                 Some(pipeline) => match pipeline.parent_info {
-                    None => return debug!("Pipeline {:?} has no parent info.", next_pipeline_id),
+                    None => return warn!("Pipeline {:?} has no parent info.", next_pipeline_id),
                     Some((_, new_subpage_id)) => new_subpage_id,
                 },
             };
             let msg = ConstellationControlMsg::UpdateSubpageId(parent_pipeline_id, subpage_id, new_subpage_id);
             script_chan.send(msg).unwrap_or_else(|_| self.handle_send_error(parent_pipeline_id));
 
             // If this is an iframe, send a mozbrowser location change event.
             // This is the result of a back/forward navigation.
@@ -1277,52 +1277,52 @@ impl<LTF: LayoutThreadFactory, STF: Scri
         assert!(prefs::get_pref("dom.mozbrowser.enabled").as_boolean().unwrap_or(false));
 
         // Find the script channel for the given parent pipeline,
         // and pass the event to that script thread.
         // If the pipeline lookup fails, it is because we have torn down the pipeline,
         // so it is reasonable to silently ignore the event.
         match self.pipelines.get(&containing_pipeline_id) {
             Some(pipeline) => pipeline.trigger_mozbrowser_event(subpage_id, event),
-            None => debug!("Pipeline {:?} handling mozbrowser event after closure.", containing_pipeline_id),
+            None => warn!("Pipeline {:?} handling mozbrowser event after closure.", containing_pipeline_id),
         }
     }
 
     fn handle_get_pipeline(&mut self, frame_id: Option<FrameId>,
                            resp_chan: IpcSender<Option<PipelineId>>) {
         let current_pipeline_id = frame_id.or(self.root_frame_id)
             .and_then(|frame_id| self.frames.get(&frame_id))
             .map(|frame| frame.current);
         let pipeline_id = self.pending_frames.iter().rev()
             .find(|x| x.old_pipeline_id == current_pipeline_id)
             .map(|x| x.new_pipeline_id).or(current_pipeline_id);
         resp_chan.send(pipeline_id)
-            .unwrap_or_else(|_| debug!("Failed get_pipeline response."));
+            .unwrap_or_else(|_| warn!("Failed get_pipeline response."));
     }
 
     fn handle_get_frame(&mut self,
                         pipeline_id: PipelineId,
                         resp_chan: IpcSender<Option<FrameId>>) {
         let frame_id = self.pipeline_to_frame_map.get(&pipeline_id).map(|x| *x);
         resp_chan.send(frame_id)
-            .unwrap_or_else(|_| debug!("Failed get_pipeline response."));
+            .unwrap_or_else(|_| warn!("Failed get_pipeline response."));
     }
 
     fn focus_parent_pipeline(&mut self, pipeline_id: PipelineId) {
         let parent_info = match self.pipelines.get(&pipeline_id) {
             Some(pipeline) => pipeline.parent_info,
-            None => return debug!("Pipeline {:?} focus parent after closure.", pipeline_id),
+            None => return warn!("Pipeline {:?} focus parent after closure.", pipeline_id),
         };
         let (containing_pipeline_id, subpage_id) = match parent_info {
             Some(info) => info,
-            None => return debug!("Pipeline {:?} focus has no parent.", pipeline_id),
+            None => return warn!("Pipeline {:?} focus has no parent.", pipeline_id),
         };
         let script_chan = match self.pipelines.get(&containing_pipeline_id) {
             Some(pipeline) => pipeline.script_chan.clone(),
-            None => return debug!("Pipeline {:?} focus after closure.", containing_pipeline_id),
+            None => return warn!("Pipeline {:?} focus after closure.", containing_pipeline_id),
         };
 
         // Send a message to the parent of the provided pipeline (if it exists)
         // telling it to mark the iframe element as focused.
         let msg = ConstellationControlMsg::FocusIFrame(containing_pipeline_id, subpage_id);
         script_chan.send(msg).unwrap_or_else(|_| self.handle_send_error(containing_pipeline_id));
         self.focus_parent_pipeline(containing_pipeline_id);
     }
@@ -1352,74 +1352,74 @@ impl<LTF: LayoutThreadFactory, STF: Scri
 
     fn handle_create_canvas_paint_thread_msg(
             &mut self,
             size: &Size2D<i32>,
             response_sender: IpcSender<IpcSender<CanvasMsg>>) {
         let webrender_api = self.webrender_api_sender.clone();
         let sender = CanvasPaintThread::start(*size, webrender_api);
         response_sender.send(sender)
-            .unwrap_or_else(|e| debug!("Create canvas paint thread response failed ({})", e))
+            .unwrap_or_else(|e| warn!("Create canvas paint thread response failed ({})", e))
     }
 
     fn handle_create_webgl_paint_thread_msg(
             &mut self,
             size: &Size2D<i32>,
             attributes: GLContextAttributes,
             response_sender: IpcSender<Result<(IpcSender<CanvasMsg>, GLLimits), String>>) {
         let webrender_api = self.webrender_api_sender.clone();
         let response = WebGLPaintThread::start(*size, attributes, webrender_api);
 
         response_sender.send(response)
-            .unwrap_or_else(|e| debug!("Create WebGL paint thread response failed ({})", e))
+            .unwrap_or_else(|e| warn!("Create WebGL paint thread response failed ({})", e))
     }
 
     fn handle_webdriver_msg(&mut self, msg: WebDriverCommandMsg) {
         // Find the script channel for the given parent pipeline,
         // and pass the event to that script thread.
         match msg {
             WebDriverCommandMsg::LoadUrl(pipeline_id, load_data, reply) => {
                 self.load_url_for_webdriver(pipeline_id, load_data, reply);
             },
             WebDriverCommandMsg::Refresh(pipeline_id, reply) => {
                 let load_data = match self.pipelines.get(&pipeline_id) {
                     Some(pipeline) => LoadData::new(pipeline.url.clone()),
-                    None => return debug!("Pipeline {:?} Refresh after closure.", pipeline_id),
+                    None => return warn!("Pipeline {:?} Refresh after closure.", pipeline_id),
                 };
                 self.load_url_for_webdriver(pipeline_id, load_data, reply);
             }
             WebDriverCommandMsg::ScriptCommand(pipeline_id, cmd) => {
                 let script_channel = match self.pipelines.get(&pipeline_id) {
                     Some(pipeline) => pipeline.script_chan.clone(),
-                    None => return debug!("Pipeline {:?} ScriptCommand after closure.", pipeline_id),
+                    None => return warn!("Pipeline {:?} ScriptCommand after closure.", pipeline_id),
                 };
                 let control_msg = ConstellationControlMsg::WebDriverScriptCommand(pipeline_id, cmd);
                 script_channel.send(control_msg)
                     .unwrap_or_else(|_| self.handle_send_error(pipeline_id));
             },
             WebDriverCommandMsg::SendKeys(pipeline_id, cmd) => {
                 let script_channel = match self.pipelines.get(&pipeline_id) {
                     Some(pipeline) => pipeline.script_chan.clone(),
-                    None => return debug!("Pipeline {:?} SendKeys after closure.", pipeline_id),
+                    None => return warn!("Pipeline {:?} SendKeys after closure.", pipeline_id),
                 };
                 for (key, mods, state) in cmd {
                     let event = CompositorEvent::KeyEvent(key, state, mods);
                     let control_msg = ConstellationControlMsg::SendEvent(pipeline_id, event);
                     script_channel.send(control_msg)
                         .unwrap_or_else(|_| self.handle_send_error(pipeline_id));
                 }
             },
             WebDriverCommandMsg::TakeScreenshot(pipeline_id, reply) => {
                 let current_pipeline_id = self.root_frame_id
                     .and_then(|root_frame_id| self.frames.get(&root_frame_id))
                     .map(|root_frame| root_frame.current);
                 if Some(pipeline_id) == current_pipeline_id {
                     self.compositor_proxy.send(ToCompositorMsg::CreatePng(reply));
                 } else {
-                    reply.send(None).unwrap_or_else(|e| debug!("Screenshot reply failed ({})", e));
+                    reply.send(None).unwrap_or_else(|e| warn!("Screenshot reply failed ({})", e));
                 }
             },
         }
     }
 
     fn load_url_for_webdriver(&mut self,
                               pipeline_id: PipelineId,
                               load_data: LoadData,
@@ -1542,40 +1542,40 @@ impl<LTF: LayoutThreadFactory, STF: Scri
     fn handle_resized_window_msg(&mut self, new_size: WindowSizeData) {
         debug!("handle_resized_window_msg: {:?} {:?}", new_size.initial_viewport.to_untyped(),
                                                        new_size.visible_viewport.to_untyped());
 
         if let Some(root_frame_id) = self.root_frame_id {
             // Send Resize (or ResizeInactive) messages to each
             // pipeline in the frame tree.
             let frame = match self.frames.get(&root_frame_id) {
-                None => return debug!("Frame {:?} resized after closing.", root_frame_id),
+                None => return warn!("Frame {:?} resized after closing.", root_frame_id),
                 Some(frame) => frame,
             };
             let pipeline_id = frame.current;
             let pipeline = match self.pipelines.get(&pipeline_id) {
-                None => return debug!("Pipeline {:?} resized after closing.", pipeline_id),
+                None => return warn!("Pipeline {:?} resized after closing.", pipeline_id),
                 Some(pipeline) => pipeline,
             };
             let _ = pipeline.script_chan.send(ConstellationControlMsg::Resize(pipeline.id, new_size));
             for pipeline_id in frame.prev.iter().chain(&frame.next) {
                 let pipeline = match self.pipelines.get(&pipeline_id) {
-                    None => { debug!("Inactive pipeline {:?} resized after closing.", pipeline_id); continue; },
+                    None => { warn!("Inactive pipeline {:?} resized after closing.", pipeline_id); continue; },
                     Some(pipeline) => pipeline,
                 };
                 let _ = pipeline.script_chan.send(ConstellationControlMsg::ResizeInactive(pipeline.id,
                                                                                           new_size));
             }
         }
 
         // Send resize message to any pending pipelines that aren't loaded yet.
         for pending_frame in &self.pending_frames {
             let pipeline_id = pending_frame.new_pipeline_id;
             let pipeline = match self.pipelines.get(&pipeline_id) {
-                None => { debug!("Pending pipeline {:?} is closed", pipeline_id); continue; }
+                None => { warn!("Pending pipeline {:?} is closed", pipeline_id); continue; }
                 Some(pipeline) => pipeline,
             };
             if pipeline.parent_info.is_none() {
                 let _ = pipeline.script_chan.send(ConstellationControlMsg::Resize(pipeline.id,
                                                                                   new_size));
             }
         }
 
@@ -1616,32 +1616,32 @@ impl<LTF: LayoutThreadFactory, STF: Scri
         // matches what the compositor has painted. If all these conditions
         // are met, then the output image should not change and a reftest
         // screenshot can safely be written.
         for frame in self.current_frame_tree_iter(self.root_frame_id) {
 
             let pipeline_id = frame.current;
 
             let pipeline = match self.pipelines.get(&pipeline_id) {
-                None => { debug!("Pipeline {:?} screenshot while closing.", pipeline_id); continue; },
+                None => { warn!("Pipeline {:?} screenshot while closing.", pipeline_id); continue; },
                 Some(pipeline) => pipeline,
             };
 
             // Check to see if there are any webfonts still loading.
             //
             // If GetWebFontLoadState returns false, either there are no
             // webfonts loading, or there's a WebFontLoaded message waiting in
             // script_chan's message queue. Therefore, we need to check this
             // before we check whether the document is ready; otherwise,
             // there's a race condition where a webfont has finished loading,
             // but hasn't yet notified the document.
             let (sender, receiver) = ipc::channel().expect("Failed to create IPC channel!");
             let msg = LayoutControlMsg::GetWebFontLoadState(sender);
             pipeline.layout_chan.0.send(msg)
-                .unwrap_or_else(|e| debug!("Get web font failed ({})", e));
+                .unwrap_or_else(|e| warn!("Get web font failed ({})", e));
             if receiver.recv().unwrap_or(true) {
                 return ReadyToSave::WebFontNotLoaded;
             }
 
             // See if this pipeline has reached idle script state yet.
             match self.document_states.get(&frame.current) {
                 Some(&DocumentState::Idle) => {}
                 Some(&DocumentState::Pending) | None => {
@@ -1729,22 +1729,22 @@ impl<LTF: LayoutThreadFactory, STF: Scri
             pipelines_to_close
         };
 
         for pipeline_id in &pipelines_to_close {
             self.close_pipeline(*pipeline_id, exit_mode);
         }
 
         if let None = self.frames.remove(&frame_id) {
-            debug!("Closing frame {:?} twice.", frame_id);
+            warn!("Closing frame {:?} twice.", frame_id);
         }
 
         if let Some((parent_pipeline_id, _)) = parent_info {
             let parent_pipeline = match self.pipelines.get_mut(&parent_pipeline_id) {
-                None => return debug!("Pipeline {:?} child closed after parent.", parent_pipeline_id),
+                None => return warn!("Pipeline {:?} child closed after parent.", parent_pipeline_id),
                 Some(parent_pipeline) => parent_pipeline,
             };
             parent_pipeline.remove_child(frame_id);
         }
     }
 
     // Close all pipelines at and beneath a given frame
     fn close_pipeline(&mut self, pipeline_id: PipelineId, exit_mode: ExitPipelineMode) {
@@ -1764,17 +1764,17 @@ impl<LTF: LayoutThreadFactory, STF: Scri
 
         // Remove any child frames
         for child_frame in &frames_to_close {
             self.close_frame(*child_frame, exit_mode);
         }
 
         let pipeline = match self.pipelines.remove(&pipeline_id) {
             Some(pipeline) => pipeline,
-            None => return debug!("Closing pipeline {:?} twice.", pipeline_id),
+            None => return warn!("Closing pipeline {:?} twice.", pipeline_id),
         };
 
         // If a child pipeline, remove from subpage map
         if let Some(info) = pipeline.parent_info {
             self.subpage_map.remove(&info);
         }
 
         // Remove assocation between this pipeline and its holding frame
@@ -1854,17 +1854,17 @@ impl<LTF: LayoutThreadFactory, STF: Scri
         if let Some(root_frame_id) = self.root_frame_id {
             if let Some(frame_tree) = self.frame_to_sendable(root_frame_id) {
 
                 let (chan, port) = ipc::channel().expect("Failed to create IPC channel!");
                 self.compositor_proxy.send(ToCompositorMsg::SetFrameTree(frame_tree,
                                                                          chan,
                                                                          self.compositor_sender.clone()));
                 if port.recv().is_err() {
-                    debug!("Compositor has discarded SetFrameTree");
+                    warn!("Compositor has discarded SetFrameTree");
                     return; // Our message has been discarded, probably shutting down.
                 }
             }
         }
 
         for frame in self.current_frame_tree_iter(self.root_frame_id) {
             self.pipelines.get(&frame.current).map(|pipeline| pipeline.grant_paint_permission());
         }