Bug 1866010 p2. Update UpdateContentViewerRegistration to reflect nsIDocumentViewer's new name. r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D194358
This commit is contained in:
Jonathan Watt 2023-11-24 09:10:48 +00:00
parent cff6dabef0
commit 85bdec26c1

View File

@ -25,7 +25,7 @@ struct ImageEnablementCookie {
const nsLiteralCString mMimeType;
};
static void UpdateContentViewerRegistration(const char* aPref, void* aData) {
static void UpdateDocumentViewerRegistration(const char* aPref, void* aData) {
auto* cookie = static_cast<ImageEnablementCookie*>(aData);
nsCOMPtr<nsICategoryManager> catMan =
@ -60,9 +60,9 @@ nsresult mozilla::image::EnsureModuleInitialized() {
mozilla::StaticPrefs::image_avif_enabled, "image/avif"_ns};
static ImageEnablementCookie kJXLCookie = {
mozilla::StaticPrefs::image_jxl_enabled, "image/jxl"_ns};
Preferences::RegisterCallbackAndCall(UpdateContentViewerRegistration,
Preferences::RegisterCallbackAndCall(UpdateDocumentViewerRegistration,
"image.avif.enabled", &kAVIFCookie);
Preferences::RegisterCallbackAndCall(UpdateContentViewerRegistration,
Preferences::RegisterCallbackAndCall(UpdateDocumentViewerRegistration,
"image.jxl.enabled", &kJXLCookie);
mozilla::image::ShutdownTracker::Initialize();