forked from mirrors/gecko-dev
Bug 1478267 - Drop the callback parameter to getShortcutOrURIAndPostData r=standard8
This commit is contained in:
parent
97855cd84d
commit
76afa8409f
1 changed files with 45 additions and 58 deletions
|
|
@ -2417,14 +2417,7 @@ function loadURI(uri, referrer, postData, allowThirdPartyFixup, referrerPolicy,
|
|||
* @resolves { url, postData, mayInheritPrincipal }. If it's not possible
|
||||
* to discern a keyword or an alias, url will be the input string.
|
||||
*/
|
||||
function getShortcutOrURIAndPostData(url, callback = null) {
|
||||
if (callback) {
|
||||
Deprecated.warning("Please use the Promise returned by " +
|
||||
"getShortcutOrURIAndPostData() instead of passing a " +
|
||||
"callback",
|
||||
"https://bugzilla.mozilla.org/show_bug.cgi?id=1100294");
|
||||
}
|
||||
return (async function() {
|
||||
async function getShortcutOrURIAndPostData(url) {
|
||||
let mayInheritPrincipal = false;
|
||||
let postData = null;
|
||||
// Split on the first whitespace.
|
||||
|
|
@ -2472,12 +2465,6 @@ function getShortcutOrURIAndPostData(url, callback = null) {
|
|||
}
|
||||
|
||||
return { url, postData, mayInheritPrincipal };
|
||||
})().then(data => {
|
||||
if (callback) {
|
||||
callback(data);
|
||||
}
|
||||
return data;
|
||||
});
|
||||
}
|
||||
|
||||
function getPostDataStream(aPostDataString,
|
||||
|
|
|
|||
Loading…
Reference in a new issue