Backed out changeset 8f9747fc7249 (bug 1129957) for e10s-bc1 test failures on a CLOSED TREE

This commit is contained in:
Carsten "Tomcat" Book 2015-05-13 08:37:27 +02:00
parent 75cbaa9b7a
commit b3aeb0a897
5 changed files with 7 additions and 38 deletions

View File

@ -866,14 +866,11 @@ function _loadURIWithFlags(browser, uri, params) {
referrer, referrerPolicy,
postdata, null, null);
} else {
if (postData)
postData = NetUtil.readInputStreamToString(postData, postData.available());
LoadInOtherProcess(browser, {
uri: uri,
flags: flags,
referrer: referrer ? referrer.spec : null,
referrerPolicy: referrerPolicy,
postData: postData,
});
}
} catch (e) {

View File

@ -203,11 +203,9 @@ ContentRestoreInternal.prototype = {
let referrerPolicy = ('referrerPolicy' in loadArguments
? loadArguments.referrerPolicy
: Ci.nsIHttpChannel.REFERRER_POLICY_DEFAULT);
let postData = loadArguments.postData ?
Utils.makeInputStream(loadArguments.postData) : null;
webNavigation.loadURIWithOptions(loadArguments.uri, loadArguments.flags,
referrer, referrerPolicy, postData,
null, null);
referrer, referrerPolicy, null, null,
null);
} else if (tabData.userTypedValue && tabData.userTypedClear) {
// If the user typed a URL into the URL bar and hit enter right before
// we crashed, we want to start loading that page again. A non-zero

View File

@ -7,8 +7,6 @@
this.EXPORTED_SYMBOLS = ["Utils"];
const Cu = Components.utils;
const Cc = Components.classes;
const Ci = Components.interfaces;
Cu.import("resource://gre/modules/Services.jsm", this);
@ -17,13 +15,6 @@ this.Utils = Object.freeze({
return Services.io.newURI(url, null, null);
},
makeInputStream: function (aString) {
let stream = Cc["@mozilla.org/io/string-input-stream;1"].
createInstance(Ci.nsISupportsCString);
stream.data = aString;
return stream; // XPConnect will QI this to nsIInputStream for us.
},
/**
* Returns true if the |url| passed in is part of the given root |domain|.
* For example, if |url| is "www.mozilla.org", and we pass in |domain| as

View File

@ -21,13 +21,6 @@ if (AppConstants.MOZ_CRASHREPORTER) {
"nsICrashReporter");
}
function makeInputStream(aString) {
let stream = Cc["@mozilla.org/io/string-input-stream;1"].
createInstance(Ci.nsISupportsCString);
stream.data = aString;
return stream; // XPConnect will QI this to nsIInputStream for us.
}
let WebProgressListener = {
init: function() {
this._filter = Cc["@mozilla.org/appshell/component/browser-status-filter;1"]
@ -241,7 +234,6 @@ let WebNavigation = {
case "WebNavigation:LoadURI":
this.loadURI(message.data.uri, message.data.flags,
message.data.referrer, message.data.referrerPolicy,
message.data.postData, message.data.headers,
message.data.baseURI);
break;
case "WebNavigation:Reload":
@ -268,19 +260,15 @@ let WebNavigation = {
this.webNavigation.gotoIndex(index);
},
loadURI: function(uri, flags, referrer, referrerPolicy, postData, headers, baseURI) {
loadURI: function(uri, flags, referrer, referrerPolicy, baseURI) {
if (AppConstants.MOZ_CRASHREPORTER && CrashReporter.enabled)
CrashReporter.annotateCrashReport("URL", uri);
if (referrer)
referrer = Services.io.newURI(referrer, null, null);
if (postData)
postData = makeInputStream(postData);
if (headers)
headers = makeInputStream(headers);
if (baseURI)
baseURI = Services.io.newURI(baseURI, null, null);
this.webNavigation.loadURIWithOptions(uri, flags, referrer, referrerPolicy,
postData, headers, baseURI);
null, null, baseURI);
},
reload: function(flags) {

View File

@ -16,12 +16,6 @@ function makeURI(url)
newURI(url, null, null);
}
function readInputStreamToString(aStream)
{
Cu.import("resource://gre/modules/NetUtil.jsm");
return NetUtil.readInputStreamToString(aStream, aStream.available());
}
function RemoteWebNavigation(browser)
{
this.swapBrowser(browser);
@ -79,13 +73,14 @@ RemoteWebNavigation.prototype = {
},
loadURIWithOptions: function(aURI, aLoadFlags, aReferrer, aReferrerPolicy,
aPostData, aHeaders, aBaseURI) {
if (aPostData || aHeaders)
throw Components.Exception("RemoteWebNavigation doesn't accept postdata or headers.", Cr.NS_ERROR_INVALID_ARGS);
this._sendMessage("WebNavigation:LoadURI", {
uri: aURI,
flags: aLoadFlags,
referrer: aReferrer ? aReferrer.spec : null,
referrerPolicy: aReferrerPolicy,
postData: aPostData ? readInputStreamToString(aPostData) : null,
headers: aHeaders ? readInputStreamToString(aHeaders) : null,
baseURI: aBaseURI ? aBaseURI.spec : null,
});
},