Граф коммитов

34 Коммитов

Автор SHA1 Сообщение Дата
Brian Grinstead 3d2d2d0ea7 Bug 1608281 - Automated rewrite away from reading properties on the global `this` in JSM files - round 1 r=mossop
This patch was generated with a script. It doesn't include all files:

- Files that use the preprocessor or fail to parse are skipped
- Files that are loaded as JSMs but don't use the .jsm extension are skipped (those will be renamed in Bug 1609269)

It was generated with the following command using d855222aa2/no-this-property-read.js:

```
hg revert --all &&
cp .gitignore .rgignore &&
rg --files-without-match -g '*.jsm' '^#endif|^#include|^#filter' | jscodeshift --stdin --transform ~/Code/jsm-rewrites/no-this-property-read.js --ignore-pattern ./mobile/android/modules/Sanitizer.jsm --ignore-pattern ./js/xpconnect/tests/unit/syntax_error.jsm &&
./mach eslint `hg st | rg '^M ' | sed 's/^M //'`
```

Differential Revision: https://phabricator.services.mozilla.com/D60187

--HG--
extra : moz-landing-system : lando
2020-01-29 21:50:04 +00:00
Victor Porof 0a8ff0ad85 Bug 1561435 - Format dom/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D35951

--HG--
extra : source : 62f3501af4bc1c0bd1ee1977a28aee04706a6663
2019-07-05 10:44:55 +02:00
Mathieu Leplatre 1cdc04dfda Bug 1541888 - Enable ESLinting in dom/push/ r=glasserc,lina
Enable ESLinting in dom/push/

Differential Revision: https://phabricator.services.mozilla.com/D26321

--HG--
extra : moz-landing-system : lando
2019-04-09 10:05:51 +00:00
Kris Maglione e930b89c34 Bug 1514594: Part 3 - Change ChromeUtils.import API.
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8

This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:

  ChromeUtils.import("resource://gre/modules/Services.jsm");

is approximately the same as the following, in the new model:

  var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");

Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs

This was done using the followng script:

https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16750

--HG--
extra : rebase_source : 359574ee3064c90f33bf36c2ebe3159a24cc8895
extra : histedit_source : b93c8f42808b1599f9122d7842d2c0b3e656a594%2C64a3a4e3359dc889e2ab2b49461bab9e27fc10a7
2019-01-17 10:18:31 -08:00
Kris Maglione 7b7264f453 Bug 1464548: Part 3 - Update callers to use defineLazyGlobalGetters. r=mccr8
MozReview-Commit-ID: 9APGewiDDYB

--HG--
extra : rebase_source : 2931dd0eec0e4206414b698a9700fc20d922eb3a
2018-05-25 17:02:29 -07:00
Florian Quèze 682b1ec3b2 Bug 1440284 - change this.EXPORTED_SYMBOLS back to var EXPORTED_SYMBOLS in JS modules, r=mccr8. 2018-02-23 20:50:01 +01:00
Andrew McCreight 5dec0e0beb 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

--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
2018-02-06 09:36:57 -08:00
Kris Maglione 918ed6c474 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

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
extra : intermediate-source : 34c999fa006bffe8705cf50c54708aa21a962e62
extra : histedit_source : b2be2c5e5d226e6c347312456a6ae339c1e634b0
2018-01-29 15:20:18 -08:00
Cosmin Sabou 9a65a40178 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 6476f95b13 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

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
2018-01-29 15:20:18 -08:00
Brindusan Cristian af8879d1eb 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 c276bb9375 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

--HG--
extra : rebase_source : c004a023389f1f6bf3d2f3efe93c13d423b23ccd
2018-01-29 15:20:18 -08:00
Marco Castelluccio 51d8b32912 Bug 1357517 - Remove Preferences.jsm usage from some dom/push/* files. r=kitcambridge
--HG--
extra : rebase_source : 77dce879e3ceb5352ea7a65673dffd53c9b9276f
2017-07-28 23:13:57 +02:00
Kit Cambridge d1bf3d09e9 Bug 1311739 - `PushDB.update` should reject instead of returning `undefined` for invalid records. r=dragana
MozReview-Commit-ID: HCLOSz4FHWO

--HG--
extra : rebase_source : 57b4e19d3b391e9b0ad96b95d36aee4e3ebcc5a5
2016-10-20 08:45:44 -07:00
Kit Cambridge 9e36cfc751 Bug 1280106 - Don't send push events to service workers without a principal. r=dragana
MozReview-Commit-ID: JwTU633hENl

--HG--
extra : rebase_source : 58d7df0903d433f9070941fd7d6853f2f2471b9c
2016-06-27 08:22:59 -07:00
Kit Cambridge 9960b60842 Back out changeset f7e1ab1bd99c (bug 1207744) for X(3) failures.
MozReview-Commit-ID: 5mgyh20yXiI

--HG--
extra : rebase_source : d3adb0098eb1615fdd134cbb4f0afd8a151a5066
2016-06-07 20:34:54 -07:00
Kit Cambridge d8d829d3c8 Bug 1207744 - Track and re-send push unregister requests on reconnect. r=dragana
MozReview-Commit-ID: 2rFLm07n4EU

--HG--
extra : rebase_source : 813c59ee7a4ca0c56717343683a54df22f1697de
extra : histedit_source : 9288402c263848c381995c3c9ae52950f6d65467
2016-06-06 16:29:36 -07:00
Kit Cambridge 4dfcfb9ee7 Bug 1275436 - Simplify firing push subscription change events. r=mt
Even if the event handler calls `subscribe()` or `getSubscription()`,
the "readwrite" IDB transactions in `clearIf` and `forEachOrigin`
should execute first.

MozReview-Commit-ID: ETYGmnOIuag

--HG--
extra : rebase_source : 8f8847a825d1fcdb09a421b852e86b81431f7e8e
2016-05-05 09:12:35 -07:00
Kit Cambridge ff6fdbef17 Bug 1246073 - Fix unique constraint errors in the H2 backend when resubscribing. r=dragana
MozReview-Commit-ID: DciQIx9T99U

--HG--
extra : rebase_source : 4d9c3a40626280bdada21e58c3112b70b3ac5b2d
2016-02-04 20:17:07 -08:00
Kit Cambridge 53cdf28e5a Bug 1223202 - Only send subscription change events if the Push permission is granted. r=mt
--HG--
extra : commitid : 4m6UEhlrFtl
extra : rebase_source : 512c9e2ea4be850994e891fc8193df17a2788260
2015-11-10 14:27:47 -08:00
Kit Cambridge b8e624b786 Bug 1210896, Part 2 - Use JS errors to reject internal Push promises. r=mt
--HG--
extra : commitid : CD3LEbvrDYq
extra : rebase_source : d1d633073a8729d67b44ad0f5b19afc50d692ebd
2015-11-09 13:58:50 -08:00
Kit Cambridge e5aa219f60 Bug 1210896, Part 1 - Use `Console.jsm` to log Push errors. r=mt
--HG--
extra : commitid : D2lgLoQtSlk
extra : rebase_source : 58bb82b758ef4dc2c4e8b8a7e902c266670347e8
2015-11-09 13:58:32 -08:00
Kit Cambridge 818dc96a78 Bug 1219063, Part 1 - Use transactions for updating Push subscription permissions. r=mt
--HG--
extra : commitid : 8ozjimWcLTn
extra : rebase_source : 8a7fe8f397256ce9e02a19bb7df40c8916a3beac
2015-10-30 18:15:48 -07:00
Kit Cambridge 641f7ea40a Bug 1217065 - Unconditionally ack incoming updates. r=dragana,benbangert
--HG--
extra : commitid : B1gV3zsa54r
2015-10-22 10:32:33 -06:00
Kit Cambridge 3898c24797 Bug 1191453 - Drop subscriptions for a site when the user revokes push permissions. r=mt,MattN
--HG--
extra : commitid : JlZvX8xAxRf
extra : rebase_source : 14372dacf2d519784890550a0e77d4c05e4f2c1a
2015-10-06 08:14:25 -07:00
Shu-yu Guo 64db2267cf Bug 1202902 - Mass replace toplevel 'let' with 'var' in preparation for global lexical scope. (rs=jorendorff) 2015-09-15 11:19:45 -07:00
Nikhil Marathe 97ea06c0c0 Bug 1188686 - Clear push subscriptions when forgetting about site. r=kitcambridge
--HG--
extra : commitid : 4z3omFAziAN
extra : transplant_source : %0A%E7%85%26%EE9%CE%95%0C/%AC%7E%89%ED%08%9A%3C%99mA
2015-07-29 11:33:48 -07:00
Kit Cambridge 97018538cd Bug 1153504 - Add per-origin push quotas. r=nsm,mt,markh
--HG--
extra : commitid : 8CPpVl9sAYo
extra : rebase_source : d4e6330e3717c89f39686c620ae0aeb90e2156c8
2015-06-25 14:52:57 -07:00
Nikhil Marathe b8eea4d16b Bug 1166350 - Push fixes for principals. r=kitcambridge,bholley
Fix xpcshell tests.
Add support for webapps-clear-data.
Trash old regs on idb version upgrade.
Use principal for permission check.
use principal in PushSubscription.

--HG--
extra : source : d7554019b424327a3271e2c0debda995fff36cb5
extra : intermediate-source : be40dea6534771bdeedc9f7c6ccd8bbddb6e41c2
2015-06-24 13:34:54 -07:00
Ryan VanderMeulen c01c5195c9 Backed out changeset 98c7277a8fb5 (bug 1166350) for xpcshell failures. 2015-06-24 16:10:45 -04:00
Nikhil Marathe bd635e2c8a Bug 1166350 - Push fixes for principals. r=kitcambridge,bholley
Fix xpcshell tests.
Add support for webapps-clear-data.
Trash old regs on idb version upgrade.
Use principal for permission check.
use principal in PushSubscription.

--HG--
extra : rebase_source : 3b8cb541512d3fb9a253773c2fd5227c980efdd2
extra : source : d7554019b424327a3271e2c0debda995fff36cb5
2015-06-02 15:56:33 -07:00
Dragana Damjanovic af2c1ad891 Bug 1150812 - Add Http2 Push service. r=nsm, r=mt 2015-06-03 08:06:00 -04:00
Dragana Damjanovic 50d7b60872 Bug 1150812 - Split PushService - make the separation more common for webSocket and http2. r=nsm, r=mt 2015-06-03 08:05:00 -04:00
Dragana Damjanovic 3f73665213 Bug 1150812 - Split PushService - separate webSocket part. r=nsm, r=mt 2015-06-03 08:04:00 -04:00