Bug 1528762. Don't inject customElements.js into system-principal about:blank. r=bgrins

Otherwise we get a performance regression on tp5o responsiveness and
tp5o_webext responsiveness when about:blank starts firing
document-element-inserted notifications.

Differential Revision: https://phabricator.services.mozilla.com/D20873

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Boris Zbarsky 2019-02-22 21:32:09 +00:00
Родитель 0497e5f2f4
Коммит f3849aa8fa
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -15,7 +15,11 @@ Services.obs.addObserver({
doc.contentType == "application/vnd.mozilla.xul+xml" ||
doc.contentType == "application/xhtml+xml" ||
doc.contentType == "text/html"
)) {
) &&
// People shouldn't be using our built-in custom elements in
// system-principal about:blank anyway, and trying to support that
// causes responsiveness regressions. So let's not support it.
doc.URL != "about:blank") {
Services.scriptloader.loadSubScript(
"chrome://global/content/customElements.js", doc.ownerGlobal);
}