Bug 1812868 - Expose chrome-only environment variables to all chrome:// documents, not just chrome-docshells. r=mstange

This will be necessary to make the new env var testable.

Reviewed in: https://phabricator.services.mozilla.com/D168148
This commit is contained in:
Emilio Cobos Álvarez 2023-02-17 21:15:06 +00:00
Родитель 49f269b507
Коммит 122d6ccddd
1 изменённых файлов: 4 добавлений и 1 удалений

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

@ -541,8 +541,11 @@ impl Device {
}
/// Return whether the document is a chrome document.
///
/// This check is consistent with how we enable chrome rules for chrome:// and resource://
/// stylesheets (and thus chrome:// documents).
#[inline]
pub fn is_chrome_document(&self) -> bool {
self.pref_sheet_prefs().mIsChrome
self.document().mDocURISchemeIsChrome()
}
}