зеркало из https://github.com/mozilla/gecko-dev.git
Bug 689599 - Ensure postData is non-null before accessing it in Browser.loadURI [r=mfinkle]
This commit is contained in:
Родитель
0ea5ec82f6
Коммит
0ddc823077
|
@ -713,9 +713,10 @@ var BrowserUI = {
|
|||
|
||||
let engine = Services.search.getEngineByName(aName);
|
||||
let submission = engine.getSubmission(searchValue, null);
|
||||
Browser.selectedBrowser.userTypedValue = submission.uri.spec;
|
||||
Browser.loadURI(submission.uri.spec, { postData: submission.postData });
|
||||
|
||||
// loadURI may open a new tab, so get the selectedBrowser afterward.
|
||||
Browser.selectedBrowser.userTypedValue = submission.uri.spec;
|
||||
this._titleChanged(Browser.selectedBrowser);
|
||||
},
|
||||
|
||||
|
|
|
@ -601,8 +601,7 @@ var Browser = {
|
|||
this.closeTab(oldTab, { forceClose: true });
|
||||
oldTab = null;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
let params = aParams || {};
|
||||
let flags = params.flags || Ci.nsIWebNavigation.LOAD_FLAGS_NONE;
|
||||
browser.loadURIWithFlags(aURI, flags, params.referrerURI, params.charset, params.postData);
|
||||
|
@ -2942,7 +2941,7 @@ Tab.prototype = {
|
|||
|
||||
try {
|
||||
let flags = aParams.flags || Ci.nsIWebNavigation.LOAD_FLAGS_NONE;
|
||||
let postData = "postData" in aParams ? aParams.postData.value : null;
|
||||
let postData = ("postData" in aParams && aParams.postData) ? aParams.postData.value : null;
|
||||
let referrerURI = "referrerURI" in aParams ? aParams.referrerURI : null;
|
||||
let charset = "charset" in aParams ? aParams.charset : null;
|
||||
browser.loadURIWithFlags(aURI, flags, referrerURI, charset, postData);
|
||||
|
|
Загрузка…
Ссылка в новой задаче