Bug 1764541 - Add telemetry for window.open with empty url argument r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D143590
This commit is contained in:
Michel Le Bihan 2022-04-20 13:39:34 +00:00
parent eeb7623b0a
commit 2ce5e195a6
2 changed files with 5 additions and 0 deletions

View File

@ -409,3 +409,6 @@ custom WrFilterFallback triggers the blob fallback for an SVG filter.
method Sanitizer.constructor
method Sanitizer.sanitize
method Element.setHTML
// Features that might be deprecated in the future
custom WindowOpenEmptyUrl calls window.open with an empty url argument

View File

@ -6976,6 +6976,8 @@ nsresult nsGlobalWindowOuter::OpenInternal(
// window will do a security check of their own.
if (!url.IsVoid() && !aDialog && aNavigate)
rv = SecurityCheckURL(url.get(), getter_AddRefs(uri));
} else if (mDoc) {
mDoc->SetUseCounter(eUseCounter_custom_WindowOpenEmptyUrl);
}
if (NS_FAILED(rv)) return rv;