зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1532765 - Do not show warning message for top-level load in URL classifier. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D23236 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
0c440cab31
Коммит
b713c23c08
|
@ -526,7 +526,7 @@ nsresult FeatureTask::Create(nsIChannel* aChannel,
|
|||
UrlClassifierFeatureFactory::GetFeaturesFromChannel(aChannel, features);
|
||||
if (features.IsEmpty()) {
|
||||
UC_LOG(("FeatureTask::Create: Nothing to do for channel %p", aChannel));
|
||||
return NS_ERROR_FAILURE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
RefPtr<FeatureTask> task = new FeatureTask(aChannel, std::move(aCallback));
|
||||
|
@ -759,6 +759,12 @@ nsresult AsyncUrlChannelClassifier::CheckChannel(
|
|||
return rv;
|
||||
}
|
||||
|
||||
if (!task) {
|
||||
// No task is needed for this channel, return an error so the caller won't
|
||||
// wait for a callback.
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
RefPtr<nsUrlClassifierDBServiceWorker> workerClassifier =
|
||||
nsUrlClassifierDBService::GetWorker();
|
||||
if (NS_WARN_IF(!workerClassifier)) {
|
||||
|
|
|
@ -114,7 +114,8 @@ bool UrlClassifierCommon::ShouldEnableClassifier(nsIChannel* aChannel) {
|
|||
}
|
||||
|
||||
rv = channel->GetTopWindowURI(getter_AddRefs(topWinURI));
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
if (NS_FAILED(rv)) {
|
||||
// Skipping top-level load.
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче