зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1370583 - Get URIClassifier service eariler. r=francois
Move the initialization of nsUrlClassifierDBService to prior of calling ShouldEnableTrackingProtection(), so the nsUrlClassifierDBService will be initialized before staring HTTP connection. If not doing so, there is a 3.x% peformance regression on android platforam.
This commit is contained in:
Родитель
08f93f542e
Коммит
c402e676f3
|
@ -1200,16 +1200,16 @@ nsChannelClassifier::CheckIsTrackerWithLocalTable(nsIURIClassifierCallback* aCal
|
|||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
if (!ShouldEnableTrackingProtection() && !ShouldEnableTrackingAnnotation()) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIURIClassifier> uriClassifier =
|
||||
do_GetService(NS_URICLASSIFIERSERVICE_CONTRACTID, &rv);
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
if (!ShouldEnableTrackingProtection() && !ShouldEnableTrackingAnnotation()) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
rv = mChannel->GetURI(getter_AddRefs(uri));
|
||||
if (NS_FAILED(rv) || !uri) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче