Bug 1305580 part 2. Change nsXMLDocument::Load telemetry to separately count chrome and content callers. r=smaug

This commit is contained in:
Boris Zbarsky 2016-09-28 15:46:46 -04:00
parent 6a6430cf38
commit 1bb443447d
2 changed files with 7 additions and 2 deletions

View File

@ -33,6 +33,7 @@ DEPRECATED_OPERATION(MozGetAsFile)
DEPRECATED_OPERATION(UseOfCaptureEvents)
DEPRECATED_OPERATION(UseOfReleaseEvents)
DEPRECATED_OPERATION(UseOfDOM3LoadMethod)
DEPRECATED_OPERATION(ChromeUseOfDOM3LoadMethod)
DEPRECATED_OPERATION(ShowModalDialog)
DEPRECATED_OPERATION(Window_Content)
DEPRECATED_OPERATION(SyncXMLHttpRequest)

View File

@ -277,8 +277,6 @@ XMLDocument::Load(const nsAString& aUrl, ErrorResult& aRv)
return false;
}
WarnOnceAbout(nsIDocument::eUseOfDOM3LoadMethod);
nsCOMPtr<nsIDocument> callingDoc = GetEntryDocument();
nsCOMPtr<nsIPrincipal> principal = NodePrincipal();
@ -293,6 +291,12 @@ XMLDocument::Load(const nsAString& aUrl, ErrorResult& aRv)
return false;
}
if (nsContentUtils::IsCallerChrome()) {
WarnOnceAbout(nsIDocument::eChromeUseOfDOM3LoadMethod);
} else {
WarnOnceAbout(nsIDocument::eUseOfDOM3LoadMethod);
}
nsIURI *baseURI = mDocumentURI;
nsAutoCString charset;