Bug 1243049 - Implement new PrefsHelper native methods; r=snorp

Implement the PrefsHelper native methods. The previous browser.js
implementation supported "pseudo-prefs" that did not exist as actual
prefs, but was accessible through PrefsHelper. In order to accommodate
these pseudo-prefs, we send observer notifications in order to
communicate with browser.js about prefs that we don't support.
This commit is contained in:
Jim Chen
2016-02-01 17:38:13 -05:00
parent e234d0f373
commit f92aa52cc1
3 changed files with 291 additions and 43 deletions

View File

@@ -341,6 +341,11 @@ nsAppShell::Observe(nsISupports* aSubject,
}
}
removeObserver = true;
} else if (!strcmp(aTopic, "nsPref:changed")) {
if (jni::IsAvailable()) {
mozilla::PrefsHelper::OnPrefChange(aData);
}
}
if (removeObserver) {