mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Backed out changeset 8508fca15e2f (bug 1323220) for e10s ASan reftest bustage
CLOSED TREE MozReview-Commit-ID: 5xEV8szfp77
This commit is contained in:
parent
c649cfaa98
commit
3094022bf6
@ -18,28 +18,16 @@ URLClassifierParent::StartClassify(nsIPrincipal* aPrincipal,
|
||||
bool aUseTrackingProtection,
|
||||
bool* aSuccess)
|
||||
{
|
||||
mStartClassifyLog = 1;
|
||||
if (*aSuccess) {
|
||||
mStartClassifyLog |= 32;
|
||||
}
|
||||
nsresult rv = NS_OK;
|
||||
// Note that in safe mode, the URL classifier service isn't available, so we
|
||||
// should handle the service not being present gracefully.
|
||||
nsCOMPtr<nsIURIClassifier> uriClassifier =
|
||||
do_GetService(NS_URICLASSIFIERSERVICE_CONTRACTID, &rv);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
mStartClassifyLog |= 2;
|
||||
rv = uriClassifier->Classify(aPrincipal, aUseTrackingProtection,
|
||||
this, aSuccess);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
mStartClassifyLog |= 4;
|
||||
}
|
||||
if (*aSuccess) {
|
||||
mStartClassifyLog |= 8;
|
||||
}
|
||||
}
|
||||
if (NS_FAILED(rv) || !*aSuccess) {
|
||||
mStartClassifyLog |= 16;
|
||||
// We treat the case where we fail to classify and the case where the
|
||||
// classifier returns successfully but doesn't perform a lookup as the
|
||||
// classification not yielding any results, so we just kill the child actor
|
||||
@ -48,28 +36,12 @@ URLClassifierParent::StartClassify(nsIPrincipal* aPrincipal,
|
||||
// on its callback if some classification actually happens.
|
||||
Unused << Send__delete__(this, void_t());
|
||||
}
|
||||
mStartClassifyRv = rv;
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
nsresult
|
||||
URLClassifierParent::OnClassifyComplete(nsresult aRv)
|
||||
{
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
if (mStartClassifyLog & 16) {
|
||||
// We have deleted the actor previously, therefore the Send__delete__() call
|
||||
// below will crash. Annotate the crash reports with a log of what's
|
||||
// happened in StartClassify().
|
||||
nsAutoCString log;
|
||||
log.AppendPrintf("%d", mStartClassifyLog);
|
||||
nsAutoCString rv;
|
||||
rv.AppendPrintf("0x%x", mStartClassifyRv);
|
||||
CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("URLClassifierParentLog"),
|
||||
log);
|
||||
CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("URLClassifierParentRv"),
|
||||
rv);
|
||||
}
|
||||
#endif
|
||||
Unused << Send__delete__(this, aRv);
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -29,11 +29,6 @@ class URLClassifierParent : public nsIURIClassifierCallback,
|
||||
|
||||
private:
|
||||
~URLClassifierParent() = default;
|
||||
|
||||
// Remember what happened in StartClassify in order to annotate the crash
|
||||
// reports later on.
|
||||
uint32_t mStartClassifyLog = 0;
|
||||
nsresult mStartClassifyRv = NS_OK;
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
Loading…
Reference in New Issue
Block a user