author | Marco Castelluccio <mcastelluccio@mozilla.com> |
Fri, 28 Jul 2017 21:22:07 +0200 | |
changeset 371880 | 11360bb6d7a15cd3afa418d3bfaa8a0db5fb09df |
parent 371879 | 19e6fdd4a271662f9fca5a0a6bf8b74dcabc1cd4 |
child 371881 | 8d62cdcccad47370b23b882f45ee713148f53ce1 |
push id | 47611 |
push user | archaeopteryx@coole-files.de |
push date | Sun, 30 Jul 2017 09:20:48 +0000 |
treeherder | autoland@8b577b152383 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | MattN |
bugs | 1357517 |
milestone | 56.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/toolkit/components/addoncompat/Prefetcher.jsm +++ b/toolkit/components/addoncompat/Prefetcher.jsm @@ -5,19 +5,16 @@ this.EXPORTED_SYMBOLS = ["Prefetcher"]; const Ci = Components.interfaces; const Cu = Components.utils; Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Services.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "Preferences", - "resource://gre/modules/Preferences.jsm"); - // Rules are defined at the bottom of this file. var PrefetcherRules = {}; /* * When events that trigger in the content process are forwarded to * add-ons in the chrome process, we expect the add-ons to send a lot * of CPOWs to query content nodes while processing the events. To * speed this up, the prefetching system anticipates which properties @@ -343,27 +340,27 @@ var Prefetcher = { for (let trigger in PrefetcherRules[addon]) { for (let rule of PrefetcherRules[addon][trigger]) { rule.index = counter++; this.ruleMap.set(rule.index, rule); } } } - this.prefetchingEnabled = Preferences.get(PREF_PREFETCHING_ENABLED, false); + this.prefetchingEnabled = Services.prefs.getBoolPref(PREF_PREFETCHING_ENABLED, false); Services.prefs.addObserver(PREF_PREFETCHING_ENABLED, this); Services.obs.addObserver(this, "xpcom-shutdown"); }, observe(subject, topic, data) { if (topic == "xpcom-shutdown") { Services.prefs.removeObserver(PREF_PREFETCHING_ENABLED, this); Services.obs.removeObserver(this, "xpcom-shutdown"); } else if (topic == PREF_PREFETCHING_ENABLED) { - this.prefetchingEnabled = Preferences.get(PREF_PREFETCHING_ENABLED, false); + this.prefetchingEnabled = Services.prefs.getBoolPref(PREF_PREFETCHING_ENABLED, false); } }, // Called when an event occurs in the content process. The event is // described by the trigger string. |addons| is a list of addons // that have listeners installed for the event. |args| is // event-specific data (such as the event object). prefetch(trigger, addons, args) {