зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1312954
- Part 11: Update speculativeConnect to speculativeConnect2 for Fennec. r=sebastian
This commit is contained in:
Родитель
65c848654a
Коммит
42a2c99db5
|
@ -4699,7 +4699,9 @@ var BrowserEventHandler = {
|
|||
let uri = this._getLinkURI(target);
|
||||
if (uri) {
|
||||
try {
|
||||
Services.io.QueryInterface(Ci.nsISpeculativeConnect).speculativeConnect(uri, null);
|
||||
Services.io.QueryInterface(Ci.nsISpeculativeConnect).speculativeConnect2(uri,
|
||||
target.ownerDocument.nodePrincipal,
|
||||
null);
|
||||
} catch (e) {}
|
||||
}
|
||||
this._doTapHighlight(target);
|
||||
|
@ -6935,7 +6937,11 @@ var Tabs = {
|
|||
try {
|
||||
let uri = Services.io.newURI(aData);
|
||||
if (uri && !this._domains.has(uri.host)) {
|
||||
Services.io.QueryInterface(Ci.nsISpeculativeConnect).speculativeConnect(uri, null);
|
||||
Services.io.QueryInterface(Ci.nsISpeculativeConnect).speculativeConnect2(uri,
|
||||
BrowserApp.selectedBrowser
|
||||
.contentDocument
|
||||
.nodePrincipal,
|
||||
null);
|
||||
this._domains.add(uri.host);
|
||||
}
|
||||
} catch (e) {}
|
||||
|
|
|
@ -135,7 +135,10 @@ public:
|
|||
if (!uri) {
|
||||
return;
|
||||
}
|
||||
specConn->SpeculativeConnect(uri, nullptr);
|
||||
|
||||
OriginAttributes attrs;
|
||||
nsCOMPtr<nsIPrincipal> principal = BasePrincipal::CreateCodebasePrincipal(uri, attrs);
|
||||
specConn->SpeculativeConnect2(uri, principal, nullptr);
|
||||
}
|
||||
|
||||
static void WaitOnGecko()
|
||||
|
|
Загрузка…
Ссылка в новой задаче