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

1331 Коммитов

Автор SHA1 Сообщение Дата
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Andrew Osmond bc0f206cd6 Bug 1670939 - Make PImageBridge::WillClose async instead of sync. r=nical,ipc-reviewers,jld
Differential Revision: https://phabricator.services.mozilla.com/D93343
2020-10-23 18:29:15 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Jean-Yves Avenard 6307ec0451 Bug 1595994 - P26. Simplify and rename RecvLaunchRDDProcess. r=mattwoodrow,nika,ipc-reviewers
And we remove unnecessary checks, BackgroundParent only run in the parent process and if e10s is on. Also RecvLauchRDDProcess will only ever be called if the rdd pref is on already.

By streamlining the call we also reduce the number of sync dispatch to 1.

Depends on D93317

Differential Revision: https://phabricator.services.mozilla.com/D93476
2020-10-20 23:32:57 +00:00
Jean-Yves Avenard d06384295b Bug 1595994 - P25. Have launch rdd be signalled over the PBackground channel. r=mattwoodrow,nika,ipc-reviewers
This remove the need for a sync dispatch to the main thread, that lead to deadlocks.

Depends on D93316

Differential Revision: https://phabricator.services.mozilla.com/D93317
2020-10-20 23:32:54 +00:00
Dan Glastonbury a70a2c09f1 Bug 1595994 - P7: Add Supports messages to PRemoteDecoderManager. r=kamidphish,nika,ipc-reviewers
Add a synchronous Supports message to the IPDL PRemoteDecoderManager protocol so
decoder modules can query for playback support in the actual process that will
attempt to do the decoding.

Depends on D54878

Differential Revision: https://phabricator.services.mozilla.com/D54879
2020-10-20 23:26:27 +00:00
Ricky Stewart 362abcf949 Bug 1670357 - Remove `make` targets for cleaning: `clean`, `realclean`, `clobber`, `distclean`, `clobber_all`, `everything` r=firefox-build-system-reviewers,mhentges
The `clobber` targets are superseded by `mach clobber`, so we don't need them for any reason. The `clean` target is meant to get you to a post-`configure` state, but it doesn't really work, and if it's necessary for you to be in that state for some reason you can just clobber and re-`configure`, so it doesn't seem worth it to get it working again. Instead, delete all of them. Also delete `everything` which is not useful when `clobber` doesn't exist.

Differential Revision: https://phabricator.services.mozilla.com/D93514
2020-10-15 20:37:18 +00:00
Tom Tung 45a97b5b83 Bug 1654080 - Use PBackground for syncing SessionStorageCache and use LSWriteOptimizer to send data changes; r=dom-workers-and-storage-reviewers,janv,nika
This patch does:
- Use LSWriteOptimizer
- Remove SessionStorageService since it's unused.
- Move IPC from PContent to PBackground
(by SessionStorageManager{Child, Parent} and SessionStorageCache{Child, Parent}).
- Extract SessionStorageManagerBase and add PBackgroundSessionStorageManager.
- Expose a getter function to get a BackgroundParentManager for top context id
on the parent.

IPC
- Before this patch:
  - Copy from parent while loading a document.
    - Mark cache entry on the parent process as loaded by the child id.
  - Update change on checkpoint.
  - Unmark cache entry on the parent process as unloaded for the child id while
  the parent actor is destorying.
- After this patch:
  - Sync IPC load in the first SessionStorage operation.
  - Update change on checkpoint

`BackgroundSessionStorageManager`'s lifecycle on the parent process.
- Create by `SessionStorageManagerParent` and register to the `sManagers`.
- Hold by `SessionStorageManagerParent` and `sManagers`.
- Remove from the `sManagers` while the corresponding `BrowsingContext` is
destructed (on the parent process).

Depends on D89341

Differential Revision: https://phabricator.services.mozilla.com/D89342
2020-10-14 00:19:33 +00:00
Eitan Isaacson 10d6dd02bc Bug 1661760 - Part 1: Unify all range from offset methods to one. r=morgan,nika
There are at least 8 different methods for getting a range from an offset:
1. left word
2. right word
3. line
4. left line
5. right line
6. sentence
7. paragraph
8. range with same style.

Having a single wrapper and IPDL method for all of those with an enum would remove
a lot of redundancies.

Differential Revision: https://phabricator.services.mozilla.com/D90936
2020-09-24 16:04:41 +00:00
Jean-Yves Avenard 6716cfb826 Bug 1664362. Use move semantics with IPC's MozPromise resolver. r=nika
We use C++14's generic lambdas and its auto&& type in the generated code, in combination with a typed local variable to ensure the argument type is enforced.

The object is moved as necessary, no copies will occur.

The code generated will now be:
  [this, self__, id__, seqno__](auto&& aParam) {
    if ((!(self__))) {
      NS_WARNING("Not resolving response because actor is dead.");
      return;
    }
    bool resolve__ = true;
    InitResultIPDL result = std::forward<decltype(aParam)>(aParam);
    IPC::Message* reply__ = PRemoteDecoder::Reply_Decode(id__);
    WriteIPDLParam(reply__, self__, resolve__);
    // Sentinel = 'resolve__'
    (reply__)->WriteSentinel(322044863);
    WriteIPDLParam(reply__, self__, std::move(result));
    // Sentinel = 'result'
    (reply__)->WriteSentinel(153223840);
    (reply__)->set_seqno(seqno__);
  }

For multiple arguments return, creation of Tuple via Tie is also moved, though currently Tie method doesn't support move semantics.

Differential Revision: https://phabricator.services.mozilla.com/D90090
2020-09-24 04:05:28 +00:00
Nika Layzell e0c3e2f9a8 Bug 1664553 - Default initialize outparameters in ipdl generated code, r=jld
Doing this helps lower the chances of accidentally trying to send an
uninitialized primitive value, like a raw pointer or integer, over IPC due to a
sync method or IPDLParamTraits::Read implementation failing to initialize the
outparameter.

Differential Revision: https://phabricator.services.mozilla.com/D89963
2020-09-11 19:49:20 +00:00
Mark Banner 3d9ea7d179 Bug 1375244 - Remove sync KeywordToURI and related IPC messages as they are no longer required. r=Gijs,mak,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D89486
2020-09-11 07:15:21 +00:00
Eitan Isaacson 1959904dc6 Bug 1661758 - Part 2: Introduce sync IPDL methods for getting leaf at offset. r=morgan,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D89064
2020-09-11 05:07:48 +00:00
Eitan Isaacson e3872eb448 Bug 1661758 - Part 1: Introduce sync IPDL methods for getting text range of child. r=morgan,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D89063
2020-09-11 05:07:46 +00:00
Brindusan Cristian c5f2ef7f15 Backed out 5 changesets (bug 1661758) for build bustages on GeckoTextMarker.h.
Backed out changeset 9b086da1f8f1 (bug 1661758)
Backed out changeset 8def1d51ae3d (bug 1661758)
Backed out changeset 17532cdc54ae (bug 1661758)
Backed out changeset be0ea9159b11 (bug 1661758)
Backed out changeset 2ca136e7d279 (bug 1661758)
2020-09-11 02:16:49 +03:00
Eitan Isaacson f613d9f64e Bug 1661758 - Part 2: Introduce sync IPDL methods for getting leaf at offset. r=morgan,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D89064
2020-09-10 21:52:20 +00:00
Eitan Isaacson d0576060fa Bug 1661758 - Part 1: Introduce sync IPDL methods for getting text range of child. r=morgan,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D89063
2020-09-10 21:52:13 +00:00
Eitan Isaacson 1962242b94 Bug 1660364 - Introduce IPDL getters for text range length, and absolute offsets. r=morgan,mccr8
We need a sync IPC call for this because otherwise the number of smaller sync messages we would need to call would be variable.

Differential Revision: https://phabricator.services.mozilla.com/D88076
2020-08-27 20:06:42 +00:00
Eitan Isaacson 1b3266b806 Bug 1660109 - Add BoundsForRange sync ipc call. r=Jamie,nika
Differential Revision: https://phabricator.services.mozilla.com/D87669
2020-08-20 22:11:41 +00:00
Eitan Isaacson 58ae94661e Bug 1657765 - Add IPDL interface for platform-specific mac API. r=morgan,Jamie,nika
Differential Revision: https://phabricator.services.mozilla.com/D86606
2020-08-14 19:33:00 +00:00
Andrew McCreight 85e0be181d Bug 1657504, part 2 - Fix deprecation warning in ipdl.py. r=nika
This is unrelated to the main issue in the bug, but I noticed
a deprecation warning in the log spew.

Differential Revision: https://phabricator.services.mozilla.com/D86229
2020-08-06 17:36:45 +00:00
Andrew McCreight bd21b11225 Bug 1657504, part 1 - Don't allow a protocol to be defined in two different files. r=nika
This changes the duplicate checking/caching implemented by |parsed| to be
based on the name of the protocol etc. we're loading, not the file name.
This lets us detect when a protocol is being defined in two different
files.

This can happen if one file is included earlier in the resolve path than
a file explicitly specified on the command line. Any includes will resolve
to the former, and then we'll attempt to parse the latter. Before this
patch, this would result in weird errors, because there would be multiple
protocol types with the same name.

Differential Revision: https://phabricator.services.mozilla.com/D86113
2020-08-06 17:42:13 +00:00
Kartikaya Gupta 39167fa7cd Bug 1251612 - Support the GetFrameUniformity API in content processes. r=botond,froydnj
This moves the IPC mechanism from PCompositorBridge to PLayerTransaction/
PWebRenderBridge, so that it can be used by content processes like the other
test APIs. It still only produces actual data for the layers backend; for
WR it will just return empty datasets.

Differential Revision: https://phabricator.services.mozilla.com/D86016
2020-08-05 21:42:06 +00:00
Ricky Stewart 11e536dbb2 Bug 1655993 - Remove Punion_Comparable::test from sync-messages.ini r=mccr8
This shouldn't have been added in the first place.

Differential Revision: https://phabricator.services.mozilla.com/D85292
2020-07-29 15:02:11 +00:00
Ricky Stewart e8ac99b085 Bug 1655371 - Fix ipdl test breaking Windows ccov builds r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D85067
2020-07-27 22:21:48 +00:00
Ricky Stewart 3419d4de1d Bug 1654589 - Move `libpref` Python unit test to `mozbuild` suite r=froydnj,mccr8
It could go into its own test suite, but it 1) depends on `mozbuild` code, so the `mozbuild` suite as well as this new suite would be running on any push that touches `mozbuild` code anyway, and 2) this is code that runs during the build, so it's not out of place.

Differential Revision: https://phabricator.services.mozilla.com/D84547
2020-07-23 22:00:46 +00:00
Simon Giesecke b0cf19fc3b Bug 1654469 - Fix test protocol names. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D84656
2020-07-23 14:07:02 +00:00
Emilio Cobos Álvarez ff61891772 Bug 1653011 - Simplify and make WeakPtr<Derived> usable and compact. r=froydnj,sg,geckoview-reviewers,jgilbert,kvark,snorp
Having two classes in the inheritance chain inherit from SupportsWeakPtr
now won't compile, but you can use WeakPtr<Derived> when any base class
inherits from SupportsWeakPtr.

Differential Revision: https://phabricator.services.mozilla.com/D83674
2020-07-23 14:51:46 +00:00
Simon Giesecke 548e423dad Bug 1654469 - Stop generating operator==/operator != for IPDL structs/unions by default. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D84485
2020-07-22 17:24:33 +00:00
Simon Giesecke d824054ce7 Bug 1654181 - Add uncomparable keyword for structs and unions. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D84298
2020-07-22 09:11:52 +00:00
Jeff Gilbert 35f892e782 Bug 1607940 - Stand up webgl.out-of-process:true path. r=handyman,nika,froydnj
* Use clearer pref names.
* Default (and only support) IPDL dispatching.
* Make DispatchCommands async-only.
* Sync ipdl command per sync webgl entrypoint.
  * Eat the boilerplate cost, since there's not too many.
* Run SerializedSize off same path as Serialize.
* All shmem uploads go through normal DispatchCommands.
* Defer pruning of dead code for now so we can iterate quickly.
* Use Read/Write(begin,end) instead of (begin,size).
  * This would have prevented a bug where we read/wrote N*sizeof(T)*sizeof(T).

Differential Revision: https://phabricator.services.mozilla.com/D81495
2020-07-21 22:56:52 +00:00
Cosmin Sabou 3576443b99 Backed out changeset 3229e30f7721 (bug 1649573) as requested by froydnj. CLOSED TREE 2020-07-13 17:18:41 +03:00
Tom Prince 204d796929 Bug 1651731: [lint] Python and shell files without `#!` should not be executable; r=linter-reviewers,perftest-reviewers,geckoview-reviewers,agi,sylvestre,sparky
Differential Revision: https://phabricator.services.mozilla.com/D82954
2020-07-09 20:29:18 +00:00
Ricky Stewart 8fe43501ec Bug 1648129 - Use faster hash for ipdl generator r=froydnj
`adler32` is about 3x as fast overall as `md5` on my machine.

Differential Revision: https://phabricator.services.mozilla.com/D81892
2020-07-01 18:31:01 +00:00
Nathan Froyd 3f6228a465 Bug 1649573 - run IPDL ipdl tests in parallel; r=firefox-build-system-reviewers,rstewart
The speedup here is not great because the Python/IPDL parser overhead is
very high, but this cuts ~10 seconds off a `-j12` build (~15s -> 4s) on
my machine.

Differential Revision: https://phabricator.services.mozilla.com/D81751
2020-07-01 15:49:32 +00:00
Junior Hsu 780b817a08 Bug 1633935 - P4 Remove On[Start|Stop]Request/OnTransportAndData in PHttpChannel, r=mayhemer,nika,necko-reviewers
We move OnStartRequest from PHttpChannel to PHttpBackgroundChannel, thus adjusting
message-metadata.ini

Depends on D76970

Differential Revision: https://phabricator.services.mozilla.com/D76971
2020-06-30 00:33:01 +00:00
Butkovits Atila 6d4dc7f680 Backed out 13 changesets (bug 1633935) as requested by Junior. CLOSED TREE
Backed out changeset 398fc19f5f6a (bug 1633935)
Backed out changeset 25822279ba5b (bug 1633935)
Backed out changeset e87b11c172b9 (bug 1633935)
Backed out changeset 709f8d50aa33 (bug 1633935)
Backed out changeset 3b268ac50692 (bug 1633935)
Backed out changeset ac9c5c1e5162 (bug 1633935)
Backed out changeset 292a5b34e9f7 (bug 1633935)
Backed out changeset 6251c22cc8f1 (bug 1633935)
Backed out changeset 73b51a139c91 (bug 1633935)
Backed out changeset 2a9873ad6856 (bug 1633935)
Backed out changeset be03e0e7b645 (bug 1633935)
Backed out changeset df5abc2c0734 (bug 1633935)
Backed out changeset 19dcca77a1cf (bug 1633935)
2020-06-25 20:25:36 +03:00
Junior Hsu 347250b5c8 Bug 1633935 - P4 Remove On[Start|Stop]Request/OnTransportAndData in PHttpChannel, r=mayhemer,nika,necko-reviewers
We move OnStartRequest from PHttpChannel to PHttpBackgroundChannel, thus adjusting
message-metadata.ini

Depends on D76970

Differential Revision: https://phabricator.services.mozilla.com/D76971
2020-06-23 16:56:53 +00:00
Andrew McCreight afe901a409 Bug 1641090, part 9 - Change IDMap into an alias for nsDataHashtable. r=nika
Now that IDMap is just a thin wrapper around an nsDataHashtable,
it is easy to convert it into an alias.

Differential Revision: https://phabricator.services.mozilla.com/D77169
2020-05-28 15:55:16 +00:00
Csoregi Natalia b4ad19225c Backed out 10 changesets (bug 1641090) for asan bustage on ProtocolFuzzer.h. CLOSED TREE
Backed out changeset 9c5e95745919 (bug 1641090)
Backed out changeset df8809d1542b (bug 1641090)
Backed out changeset 92cde6ee6ade (bug 1641090)
Backed out changeset 23d5d734d0bd (bug 1641090)
Backed out changeset 6af841322f4d (bug 1641090)
Backed out changeset 2ce016edb6fc (bug 1641090)
Backed out changeset a513d47956f9 (bug 1641090)
Backed out changeset 48bc9ce7afeb (bug 1641090)
Backed out changeset 173a1c2e3e55 (bug 1641090)
Backed out changeset c915cb660411 (bug 1641090)
2020-05-28 08:51:13 +03:00
Andrew McCreight c93adfb04f Bug 1641090, part 9 - Change IDMap into an alias for nsDataHashtable. r=nika
Now that IDMap is just a thin wrapper around an nsDataHashtable,
it is easy to convert it into an alias.

Differential Revision: https://phabricator.services.mozilla.com/D77169
2020-05-28 00:54:21 +00:00
Gijs Kruitbosch 38b061ef45 Bug 1638373 - remove js/ipc now that CPOWs are dead, r=mccr8
Depends on D76597

Differential Revision: https://phabricator.services.mozilla.com/D76598
2020-05-24 18:47:04 +00:00
Emilio Cobos Álvarez 7b19f0d6d4 Bug 1609024 - Remove cache mechanism which is not very useful. r=hiro,snorp,mccr8
I don't think all this complexity is worth it for having a
marginally-more-realistic testing story. Using the pref just works and we should
do that, I think.

Differential Revision: https://phabricator.services.mozilla.com/D59980
2020-05-21 17:02:06 +00:00
Peter Van der Beken 1990918ebe Bug 1570255 - Remove sync session history implementation. r=smaug,nika
Differential Revision: https://phabricator.services.mozilla.com/D65326
2020-05-20 09:09:06 +00:00
Nika Layzell 533fa5bd14 Bug 1635689 - Part 2: Stop generating 'get' method on IPDL unions, r=jld
This method always copies, and is redundant with the other getter methods on
IPDL unions. As there is only one caller, it can be removed to simplify the
code, and remove a source of complexity.

Differential Revision: https://phabricator.services.mozilla.com/D75349
2020-05-18 19:39:54 +00:00
Csoregi Natalia 517e830522 Backed out 4 changesets (bug 1629866, bug 1570255) for assertion failures on DocumentChannelChild.cpp. CLOSED TREE
Backed out changeset 214e4a11be0d (bug 1570255)
Backed out changeset db066dda1bb8 (bug 1570255)
Backed out changeset d9f75d88613e (bug 1570255)
Backed out changeset fe2d4790b73a (bug 1629866)
2020-05-13 18:30:42 +03:00
Peter Van der Beken e2a88c491c Bug 1570255 - Remove sync session history implementation. r=smaug,nika
Differential Revision: https://phabricator.services.mozilla.com/D65326
2020-05-13 14:24:55 +00:00