Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: lib/child/frameScript.js

Issue 29338242: Issue 3792 - Fix to support multiprocess firefox (Closed)
Left Patch Set: address comments Created Sept. 29, 2016, 3:33 p.m.
Right Patch Set: change comment Created Sept. 30, 2016, 12:43 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | lib/crawler.js » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This Source Code is subject to the terms of the Mozilla Public License 2 * This Source Code is subject to the terms of the Mozilla Public License
3 * version 2.0 (the "License"). You can obtain a copy of the License at 3 * version 2.0 (the "License"). You can obtain a copy of the License at
4 * http://mozilla.org/MPL/2.0/. 4 * http://mozilla.org/MPL/2.0/.
5 */ 5 */
6 6
7 "use strict"; 7 "use strict";
8 8
9 const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components; 9 const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
10 10
(...skipping 24 matching lines...) Expand all
35 onStateChange: function(webProgress, request, flags, status) 35 onStateChange: function(webProgress, request, flags, status)
36 { 36 {
37 if (webProgress.DOMWindow == content && 37 if (webProgress.DOMWindow == content &&
38 (flags & Ci.nsIWebProgressListener.STATE_STOP)) 38 (flags & Ci.nsIWebProgressListener.STATE_STOP))
39 { 39 {
40 // First time we receive STATE_STOP for about:blank and the second time 40 // First time we receive STATE_STOP for about:blank and the second time
41 // for our interested URL which is distinct from about:blank. 41 // for our interested URL which is distinct from about:blank.
42 // However we should not process about:blank because it can happen that 42 // However we should not process about:blank because it can happen that
43 // the message with information about about:blank is delivered when the 43 // the message with information about about:blank is delivered when the
44 // code in crawler.js is already waiting for a message from this tab. 44 // code in crawler.js is already waiting for a message from this tab.
45 // Another not interesting for us case is about:newtab. 45 // Another case we are not interested in is about:newtab.
46 if (content.location.protocol == "about:") 46 if (content.location.protocol == "about:")
47 return; 47 return;
48 let pageInfo = {channelStatus: status}; 48 let pageInfo = {channelStatus: status};
49 if (request instanceof Ci.nsIHttpChannel) 49 if (request instanceof Ci.nsIHttpChannel)
50 { 50 {
51 try 51 try
52 { 52 {
53 pageInfo.headers = []; 53 pageInfo.headers = [];
54 pageInfo.headers.push("HTTP/x.x " + request.responseStatus + " " + req uest.responseStatusText); 54 pageInfo.headers.push("HTTP/x.x " + request.responseStatus + " " + req uest.responseStatusText);
55 request.visitResponseHeaders((header, value) => pageInfo.headers.push( header + ": " + value)); 55 request.visitResponseHeaders((header, value) => pageInfo.headers.push( header + ": " + value));
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 result.source = serializer.serializeToString(document.documentElement); 120 result.source = serializer.serializeToString(document.documentElement);
121 } 121 }
122 catch(e) 122 catch(e)
123 { 123 {
124 reportException(e); 124 reportException(e);
125 result.errors.push("Cannot obtain page source code"); 125 result.errors.push("Cannot obtain page source code");
126 } 126 }
127 127
128 return result; 128 return result;
129 } 129 }
LEFTRIGHT
« no previous file | lib/crawler.js » ('j') | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld