servo: Merge #11480 - rename (from rafaqtro:local_b); r=emilio
authorRafael Quintero <rafaqtro@gmail.com>
Wed, 01 Jun 2016 00:15:51 -0500
changeset 338970 17279bc5045f3f7205964e9679f1cc70c12bc984
parent 338969 5e36f837a50a0ffeefba5153dc5350b60b8a8561
child 338971 bcb6417523f4c598af37e9db56230a226675331f
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)
reviewersemilio
servo: Merge #11480 - rename (from rafaqtro:local_b); r=emilio rename <!-- Please describe your changes on the following line: --> rename of page_fetch_complete and handle_page_fetch_complete for page_headers_available and handle_page_headers_available . --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #11418 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: 5d86b9b2ae801685cbae7a1d96587a25d993fdf6
servo/components/script/dom/servohtmlparser.rs
servo/components/script/script_thread.rs
--- a/servo/components/script/dom/servohtmlparser.rs
+++ b/servo/components/script/dom/servohtmlparser.rs
@@ -89,19 +89,19 @@ impl AsyncResponseListener for ParserCon
                 let mut meta = Metadata::default(url);
                 let mime: Option<Mime> = "text/html".parse().ok();
                 meta.set_content_type(mime.as_ref());
                 Some(meta)
             },
             Err(_) => None,
         };
         let content_type = metadata.clone().and_then(|meta| meta.content_type);
-        let parser = match ScriptThread::page_fetch_complete(&self.id,
-                                                             self.subpage.as_ref(),
-                                                             metadata) {
+        let parser = match ScriptThread::page_headers_available(&self.id,
+                                                                self.subpage.as_ref(),
+                                                                metadata) {
             Some(parser) => parser,
             None => return,
         };
 
         let parser = parser.r();
         self.parser = Some(match parser {
             ParserRef::HTML(parser) => TrustedParser::HTML(
                                         Trusted::new(parser)),
--- a/servo/components/script/script_thread.rs
+++ b/servo/components/script/script_thread.rs
@@ -474,21 +474,21 @@ impl ScriptThreadFactory for ScriptThrea
 
 pub unsafe extern "C" fn shadow_check_callback(_cx: *mut JSContext,
     _object: HandleObject, _id: HandleId) -> DOMProxyShadowsResult {
     // XXX implement me
     DOMProxyShadowsResult::ShadowCheckFailed
 }
 
 impl ScriptThread {
-    pub fn page_fetch_complete(id: &PipelineId, subpage: Option<&SubpageId>, metadata: Option<Metadata>)
-                               -> Option<ParserRoot> {
+    pub fn page_headers_available(id: &PipelineId, subpage: Option<&SubpageId>, metadata: Option<Metadata>)
+                                  -> Option<ParserRoot> {
         SCRIPT_THREAD_ROOT.with(|root| {
             let script_thread = unsafe { &*root.borrow().unwrap() };
-            script_thread.handle_page_fetch_complete(id, subpage, metadata)
+            script_thread.handle_page_headers_available(id, subpage, metadata)
         })
     }
 
     pub fn parsing_complete(id: PipelineId) {
         SCRIPT_THREAD_ROOT.with(|root| {
             let script_thread = unsafe { &*root.borrow().unwrap() };
             script_thread.handle_parsing_complete(id);
         });
@@ -1317,18 +1317,18 @@ impl ScriptThread {
         // TODO(tkuehn): currently there is only one window,
         // so this can afford to be naive and just shut down the
         // constellation. In the future it'll need to be smarter.
         self.constellation_chan.send(ConstellationMsg::Exit).unwrap();
     }
 
     /// 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: Option<Metadata>) -> Option<ParserRoot> {
+    fn handle_page_headers_available(&self, id: &PipelineId, subpage: Option<&SubpageId>,
+                                     metadata: Option<Metadata>) -> Option<ParserRoot> {
         let idx = self.incomplete_loads.borrow().iter().position(|load| {
             load.pipeline_id == *id && load.parent_info.as_ref().map(|info| &info.1) == subpage
         });
         // The matching in progress load structure may not exist if
         // the pipeline exited before the page load completed.
         match idx {
             Some(idx) => {
                 let load = self.incomplete_loads.borrow_mut().remove(idx);