servo: Merge #13078 - Added using real pipeline ID value (from wdv4758h:pipeline); r=jdm
authorChiu-Hsiang Hsu <wdv4758h@gmail.com>
Sat, 27 Aug 2016 09:23:13 -0500
changeset 339592 aec432f380fc4a340503c9d3d4d4851ad623eef1
parent 339591 781f4ce24115c1d4abbc51659d808037d4280692
child 339593 730093b6ccd1a1e3efef005065ec0f20bc7dc73a
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 #13078 - Added using real pipeline ID value (from wdv4758h:pipeline); r=jdm Stop using fake pipeline ID value - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #13000 - [X] These changes do not require tests because no test for devtools Source-Repo: https://github.com/servo/servo Source-Revision: 2b061192e917401843de0bd1ba02232b403578cc
servo/components/devtools/lib.rs
--- a/servo/components/devtools/lib.rs
+++ b/servo/components/devtools/lib.rs
@@ -530,20 +530,23 @@ fn run_server(sender: Sender<DevtoolsCon
             },
             DevtoolsControlMsg::FromChrome(ChromeToDevtoolsControlMsg::NetworkEvent(
                         request_id, network_event)) => {
                 // copy the accepted_connections vector
                 let mut connections = Vec::<TcpStream>::new();
                 for stream in &accepted_connections {
                     connections.push(stream.try_clone().unwrap());
                 }
-                //TODO: Get pipeline_id from NetworkEventMessage after fixing the send in http_loader
-                // For now, the id of the first pipeline is passed
+
+                let pipeline_id = match network_event {
+                    NetworkEvent::HttpResponse(ref response) => response.pipeline_id,
+                    NetworkEvent::HttpRequest(ref request) => request.pipeline_id,
+                };
                 handle_network_event(actors.clone(), connections, &actor_pipelines, &mut actor_requests,
-                                     &actor_workers, PipelineId::fake_root_pipeline_id(), request_id, network_event);
+                                     &actor_workers, pipeline_id, request_id, network_event);
             },
             DevtoolsControlMsg::FromChrome(ChromeToDevtoolsControlMsg::ServerExitMsg) => break
         }
     }
     for connection in &mut accepted_connections {
         let _ = connection.shutdown(Shutdown::Both);
     }
 }