Commit Graph

167 Commits

Author SHA1 Message Date
Gijs Kruitbosch
c992567f5c Bug 1452618 - make getAddonBlocklistEntry asynchronous, r=kmag
MozReview-Commit-ID: 4Kpx7M57404
2018-04-09 16:00:38 +01:00
Gurzau Raul
269d4945df Backed out 2 changesets (bug 1452618) for frequently failing mochitest on Android on a CLOSED TREE
Backed out changeset 5bf3bfedd867 (bug 1452618)
Backed out changeset fdcb9f2ec9d9 (bug 1452618)
2018-04-15 13:12:56 +03:00
Gijs Kruitbosch
8d46b6ff2b Bug 1452618 - make getAddonBlocklistEntry asynchronous, r=kmag
MozReview-Commit-ID: 4Kpx7M57404
2018-04-09 16:00:38 +01:00
Kris Maglione
66e0295da3 Bug 1453123: Have CertUtils export a CertUtils object. r=rhelmer
MozReview-Commit-ID: 1XInmbNQ2wo
2018-04-10 13:23:35 -07:00
Mathieu Leplatre
27cdd34ced Bug 1450998 - Improve API and docs for Remote Settings r=mgoodwin
MozReview-Commit-ID: EszfBy3xNP9
2018-03-29 14:38:16 -07:00
Gijs Kruitbosch
06d6f2d545 Bug 1451743 - remove getAddonBlocklistURL from nsIBlocklistService, r=florian
MozReview-Commit-ID: HSrOHIZ1MA
2018-04-05 15:05:28 +01:00
Gijs Kruitbosch
399d72110b Bug 1451487 - remove nsIBlocklistService::isAddonBlocklisted as it's unused, r=mossop
MozReview-Commit-ID: Ht9DgjliSoo
2018-04-04 22:01:08 +01:00
Mathieu Leplatre
7a06a75010 Bug 1397230 - Generalize blocklist clients to remote settings clients r=mgoodwin
MozReview-Commit-ID: 9VAsTFCuZUf
2018-03-13 16:23:57 +01:00
Gijs Kruitbosch
406eb1deaa Bug 1445990 - fix initialization of blocklist service in non-browser apps, r=florian
MozReview-Commit-ID: GK4SA8gJ8Pf
2018-03-15 16:16:11 +00:00
Coroiu Cristina
b59eb894e8 Backed out changeset 3b82709eca8a (bug 1445990) for xpcshell failures at js/xpconnect/tests/unit/test_defineModuleGetter.js on a CLOSED TREE 2018-03-16 04:27:22 +02:00
Gijs Kruitbosch
2839836b10 Bug 1445990 - fix initialization of blocklist service in non-browser apps, r=florian
MozReview-Commit-ID: GK4SA8gJ8Pf
2018-03-15 16:16:11 +00:00
Gijs Kruitbosch
15c9066b69 Bug 1371888 - Stop having a sync IPC message to pass blocklist state, r=florian
Because plugin state in the content now contains blocklist state, and is updated
when the blocklist updates, we don't need to ask the parent if we're checking
blocklist state. All the consumers should now be asking the plugin code directly,
so we can stub out the last API here. We should look at removing the content side
of this service entirely, but that's something for a follow-up bug.

MozReview-Commit-ID: DE8s8RwT42r
2018-03-06 16:37:49 +00:00
Gijs Kruitbosch
2c52d17c20 Bug 1371888 - cache plugin information in pluginreg.dat to avoid sync startup load, r=florian,mossop
This changes the pluginreg.dat format to include the blocklist state.

There is now only the saved blocklist state in a plugin tag instance, rather than
looking it up from in there using the blocklist service, so it was renamed from
mCachedBlocklistState to mBlocklistState. We pass the 'right' state to the plugin
instance when the plugintag is constructed. If we don't have state, we mark it as
unblocked.

mCachedBlocklistStateChanged was never read so it's being removed.

Bug 1439519 adds a 'blocklist-loaded' notification that is fired once the blocklist is loaded.
The plugin host implementation will listen to this in the parent process and update the
blocklist state of all the plugins, and broadcast changes to the child process, just like when
we update the blocklist from the server. We now also avoid re-sending plugin content to the
content processes if the plugin state hasn't changed as a result of the blocklist having been
loaded.

Finally, because new plugins should still get an up-to-date blocklist state, and
telemetry should get up-to-date data about which plugins are and aren't enabled
once we have that data, we ensure that once we've loaded the blocklist async,
we schedule an idle task to parse it and consider it loaded.

All this means that plugin blocklist information could be mistaken between the points where
a new plugin is installed and we first run Firefox with the new plugin, and the point where
we load the blocklist. Given the trade-offs, that size of window (tiny) seems OK, also given
that there's already a much larger window in blocklist updates (which only happen once every 24h).

MozReview-Commit-ID: 1gsojRkUzTw
2018-02-20 16:53:48 +00:00
Gijs Kruitbosch
345863ee88 Bug 1439519 - fetch plugin information lazily in TelemetryEnvironment.jsm, r=chutten,florian
MozReview-Commit-ID: 9eUwq3lMdZD
2018-03-06 16:31:24 +00:00
Florian Quèze
f6add2cafd Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:33 +01:00
Gijs Kruitbosch
b6f3d82b3a Bug 1439405 - attempt to make blocklist code slightly nicer, r=florian
This adds some more use of Services.jsm, does proper fallback for the app
blocklist if the profile one is unavailable, and avoids parsing the XML
from an updated blocklist twice.

Originally this also switched to using XHR instead of the awful manual
sync-on-mainthread-IO stream parsing, but sync XHR uses event loop
spinning, which breaks random things working the way they should, so
that bit is left until we make this code (hopefully) more async in
nature.

MozReview-Commit-ID: FgXyWl1NNaV
2018-02-21 16:37:47 +00:00
Thomas Wisniewski
6ba7255647 Bug 792808 - Change toolkit/ to import and instantiate XHRs from global properties rather than using Cc.createInstance(Ci.nsIXMLHttpRequest); r=aswan
MozReview-Commit-ID: CUrMOocHBNu
2018-02-08 20:09:57 -05:00
Andrew McCreight
272cee1e65 Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG
2018-02-06 09:36:57 -08:00
Florian Quèze
c5f15a4700 Bug 1339461 - script-generated patch to convert foo.indexOf(...) == -1 to foo.includes(), r=Mossop. 2018-02-01 20:45:22 +01:00
Mathieu Leplatre
94e85ead5e Bug 1399864 - Send If-Modified-Since header when polling for blocklist.xml changes, r=florian
MozReview-Commit-ID: oAM9lDhtlt
2018-01-31 11:45:53 +00:00
Kris Maglione
0bb74efdf1 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Chris Peterson
18fcd3cb50 Bug 1425600 - Cache nsIPluginTag properties accessed in the plugin blocklist loop. r=Gijs
On my MacBook Pro, this change reduces this loop's time from ~4 ms to ~3 ms. This loop is not hot, but moving these xpconnect calls out of the loop is still a good idea.

MozReview-Commit-ID: ASwb6xZb6ur
2018-01-28 14:10:11 -08:00
Cosmin Sabou
f09d6d985d Backed out 3 changesets (bug 1431533) for Android mochitest failures on testEventDispatcher on a CLOSED TREE
Backed out changeset a1eca62826a1 (bug 1431533)
Backed out changeset 34c999fa006b (bug 1431533)
Backed out changeset e2674287e57f (bug 1431533)
2018-01-30 07:17:48 +02:00
Kris Maglione
fd67f090b2 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Brindusan Cristian
483ba301cb Backed out 2 changesets (bug 1431533) for ESlint failures on a CLOSED TREE
Backed out changeset 6e56f4c8843e (bug 1431533)
Backed out changeset 12fc4dee861c (bug 1431533)
2018-01-30 02:32:43 +02:00
Kris Maglione
683a97d172 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Florian Quèze
7ed40ce71f Bug 1428401 - Remove obsolete getPref helpers, r=Gijs. 2018-01-06 00:25:51 +01:00
Mark Banner
8f44f461ba Bug 1417944 - Enable ESLint rule mozilla/use-services for toolkit/mozapps/extensions. r=aswan
MozReview-Commit-ID: 6nK45TknN9x
2017-11-22 13:35:52 +00:00
Zibi Braniecki
6a1f948585 Bug 1410733 - Minor cleanups to the callers of GetRequestedLocales. r=jfkthame
Once we add fallback chain to GetRequestedLocales we can slightly improve the
locale negotiation for extensions. I made it tighter against just `en-US` because
in the future it is possible that RequestedLocales fallback chain will not contain
en-US in some scenarios, and it seems that for WebExtensions en-US should be the
last resort no matter what.

The other change is a fix to a regression I introduced when switching to LocaleService,
that somehow noone noticed.

MozReview-Commit-ID: FH6cePcoi0R
2017-10-22 11:44:11 -07:00
Sebastian Hengst
3b423ee872 Backed out changeset 3bd7e87109e0 (bug 1410733) 2017-10-24 18:57:34 +02:00
Zibi Braniecki
2e396a4165 Bug 1410733 - Minor cleanups to the callers of GetRequestedLocales. r=jfkthame
Once we add fallback chain to GetRequestedLocales we can slightly improve the
locale negotiation for extensions. I made it tighter against just `en-US` because
in the future it is possible that RequestedLocales fallback chain will not contain
en-US in some scenarios, and it seems that for WebExtensions en-US should be the
last resort no matter what.

The other change is a fix to a regression I introduced when switching to LocaleService,
that somehow noone noticed.

MozReview-Commit-ID: FH6cePcoi0R
2017-10-22 11:44:11 -07:00
Dan Banner
5af4450327 Bug 1408777 - Automatically fix instances of missing semicolons in the tree. r=Standard8
MozReview-Commit-ID: Jm8BRgt6mIv
2017-10-15 20:50:39 +01:00
Dale Harvey
6baccea11c Bug 1394248 - Update plugins icon. r=dao
MozReview-Commit-ID: L3UrtSwDxW2
2017-09-30 10:43:02 +01:00
Mark Goodwin
0671ec68d0 Bug 1359428 - Remove preference to select OneCRL update mechanism r=keeler,leplatrem,rhelmer
MozReview-Commit-ID: A6CwZrIDmTn
2017-09-29 10:47:27 +01:00
Masatoshi Kimura
4201c76ce9 Bug 437381 - Remove nsIJSXMLHttpRequest and fix the comments in nsIXMLHttpRequest.h. r=smaug
MozReview-Commit-ID: CYkV01S9QEZ
2017-08-12 01:16:22 +09:00
Eric Rahm
87bc873dcc Bug 1386825 - Part 2: Remove MOZ_B2G from toolkit. r=froydnj
MozReview-Commit-ID: Ji3MoFKLVI4
2017-08-08 14:41:07 -07:00
Kris Maglione
6f1e7cff59 Bug 1377538: Store blocklistState and blocklistURL in the add-ons DB. r=rhelmer
MozReview-Commit-ID: AQx51Vn0R4R
2017-07-03 18:05:52 -07:00
Mathieu Leplatre
1618e8dfd3 Bug 1357116 - Load the blocklist updater module lazily r=florian,mgoodwin
Importing the blocklist-updater module on each notification in nsBlocklistService
could cause us to periodically jank the browser UI.

This patch now lazy loads as many dependencies as possible.


MozReview-Commit-ID: HBGjSJi5PwE
2017-04-20 10:35:04 +02:00
Florian Quèze
ff53eb9a63 Bug 1353542 - massive script-generated patch converting Task.async and Task.spawn calls, and generators clearly identifiable as tasks, rs=Mossop. 2017-05-12 14:42:39 +02:00
Sebastian Hengst
488d8117f2 Backed out changeset 83fe6517d5be (bug 1357116) for eslint failures in blocklist-clients.js. r=backout 2017-05-02 19:59:32 +02:00
Mathieu Leplatre
e4291c24ad Bug 1357116 - Load the blocklist updater module lazily r=florian,mgoodwin
MozReview-Commit-ID: IjdpY9JZQPL
2017-04-27 14:45:57 +02:00
Zibi Braniecki
8c433fc56a Bug 1346616 - Migrate callsites that are retrieving requested locale from pref, to use LocaleService::GetRequestedLocales. r=jfkthame,Pike
I'm adding a helper function mozILocaleService::GetRequestedLocale to simplify
most of the callsites that are looking for the first of the requested locales.

In most cases, I'm just matching the behavior of the code with reusing
LocaleService API instead of direct manipulation on the prefs.
That includes how I handle error case scenarios.

In case of sdk/l10n/locale.js I am reusing LocaleService heuristics over
the custom one from the file since the ones in LocaleService are just
more correct and unified accross the whole platform.

In case of FallbackEncoding I have to turn it into a nsIObserver to listen
to intl:requested-locales-changed.

MozReview-Commit-ID: 7rOr2CovLK
2017-03-11 18:43:11 -08:00
Sebastian Hengst
017c2ee2bf Backed out changeset 60d72c2dd49d (bug 1346616) for eslint failure in DirectoryLinksProvider.jsm. r=backout on a CLOSED TREE 2017-04-18 00:48:16 +02:00
Zibi Braniecki
64bae2dccf Bug 1346616 - Migrate callsites that are retrieving requested locale from pref, to use LocaleService::GetRequestedLocales. r=jfkthame,Pike
I'm adding a helper function mozILocaleService::GetRequestedLocale to simplify
most of the callsites that are looking for the first of the requested locales.

In most cases, I'm just matching the behavior of the code with reusing
LocaleService API instead of direct manipulation on the prefs.
That includes how I handle error case scenarios.

In case of sdk/l10n/locale.js I am reusing LocaleService heuristics over
the custom one from the file since the ones in LocaleService are just
more correct and unified accross the whole platform.

In case of FallbackEncoding I have to turn it into a nsIObserver to listen
to intl:requested-locales-changed.

MozReview-Commit-ID: 7rOr2CovLK
2017-03-11 18:43:11 -08:00
Florian Queze
451928e614 Bug 1356569 - Remove notifyObservers' last parameter when it is falsy, r=jaws. 2017-04-14 21:51:39 +02:00
Florian Queze
d3c36892fa Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Sebastian Hengst
42670ceca0 Backed out changeset 322fde2d53bf (bug 1356569) so bug 1355161 can be backed out. r=backout 2017-04-14 23:39:22 +02:00
Sebastian Hengst
f75839c723 Backed out changeset 55f3df15eaa6 (bug 1356569) 2017-04-14 23:39:17 +02:00
Florian Queze
61aabdf237 Bug 1356569 - Remove notifyObservers' last parameter when it is falsy, r=jaws. 2017-04-14 21:51:39 +02:00
Florian Queze
9b4f73599f Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00