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

175 Коммитов

Автор SHA1 Сообщение Дата
Mike Hommey ae874d3dfc Bug 1733308 - Forbid sources files with the same base name. r=firefox-build-system-reviewers,andi
While the build system could be improved to actually support those
cases, because of all the legacy things involved, it would be a lot more
work for a low reward.

Instead, we forbid them, which allows to remove the non-unified builds
exception in xpcom/rust/gtest.

Differential Revision: https://phabricator.services.mozilla.com/D127035
2021-10-01 01:49:16 +00:00
Andi-Bogdan Postelnicu 2fc4f70e9b Bug 1725145 - Preparation for the hybrid build env. r=necko-reviewers,firefox-build-system-reviewers,valentin,glandium
Automatically generated path that adds flag `REQUIRES_UNIFIED_BUILD = True` to `moz.build`
when the module governed by the build config file is not buildable outside on the unified environment.

This needs to be done in order to have a hybrid build system that adds the possibility of combing
unified build components with ones that are built outside of the unified eco system.

Differential Revision: https://phabricator.services.mozilla.com/D122345
2021-08-25 10:46:17 +00:00
Zibi Braniecki 750e9a5da5 Bug 1613705 - [localization] part11: Fix XPCOM future_task polling assert. r=nika
Depends on D105586

Differential Revision: https://phabricator.services.mozilla.com/D114508
2021-08-03 16:25:14 +00:00
Butkovits Atila 949da905e7 Backed out 19 changesets (bug 1613705) for causing build bustages complaining about Document.cpp. CLOSED TREE
Backed out changeset 2ee1091dd20d (bug 1613705)
Backed out changeset d377afc0b09f (bug 1613705)
Backed out changeset de9d4378f0ac (bug 1613705)
Backed out changeset 9843372abb6e (bug 1613705)
Backed out changeset 5fc5918e5905 (bug 1613705)
Backed out changeset a7aeae7afd49 (bug 1613705)
Backed out changeset 5d61617a5402 (bug 1613705)
Backed out changeset 85bf98573899 (bug 1613705)
Backed out changeset 175af8a1b8c2 (bug 1613705)
Backed out changeset 93fcb23d7898 (bug 1613705)
Backed out changeset 595529cd906f (bug 1613705)
Backed out changeset 9f3e2963d925 (bug 1613705)
Backed out changeset 442289058933 (bug 1613705)
Backed out changeset fc3b9acb0e81 (bug 1613705)
Backed out changeset 408983c64f7f (bug 1613705)
Backed out changeset 08b637fc3fcd (bug 1613705)
Backed out changeset 6ef0aafd2db0 (bug 1613705)
Backed out changeset d88b294e0a5e (bug 1613705)
Backed out changeset e6bebff87544 (bug 1613705)
2021-08-03 12:36:01 +03:00
Zibi Braniecki e4f37c5029 Bug 1613705 - [localization] part11: Fix XPCOM future_task polling assert. r=nika
Depends on D105586

Differential Revision: https://phabricator.services.mozilla.com/D114508
2021-08-03 05:52:04 +00:00
Cosmin Sabou 3564c330b3 Backed out 11 changesets (bug 1613705) for several test failures. CLOSED TREE
Backed out changeset 4e690882b6af (bug 1613705)
Backed out changeset 302e7a75affc (bug 1613705)
Backed out changeset 626b40e3aad1 (bug 1613705)
Backed out changeset 1cbab987bb7d (bug 1613705)
Backed out changeset 2213917abb30 (bug 1613705)
Backed out changeset c89aa0375690 (bug 1613705)
Backed out changeset 6466027c5767 (bug 1613705)
Backed out changeset 6c188c4b38bf (bug 1613705)
Backed out changeset 8d0c087b9896 (bug 1613705)
Backed out changeset 3404fd6725f1 (bug 1613705)
Backed out changeset c9cfbba15d90 (bug 1613705)
2021-08-02 14:04:29 +03:00
Zibi Braniecki 9bfbca88d8 Bug 1613705 - [localization] part11: Fix XPCOM future_task polling assert. r=nika
Depends on D105586

Differential Revision: https://phabricator.services.mozilla.com/D114508
2021-08-02 09:54:11 +00:00
Nika Layzell 40a0ecc65f Bug 1709935 - Support XPCOM refcount logging with rust-xpcom, r=xpcom-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D115086
2021-05-19 17:29:23 +00:00
Nika Layzell 3a56bcbaeb Bug 1709227 - Include offset information in rust-xpcom vtables, r=mccr8
In the Itanium C++ ABI VTables contain extra fields before the virtual function
pointer list for RTTI information, and these fields are not eliminated even
when RTTI is disabled using -fno-rtti. The two relevant fields for rust-xpcom's
vtables are the "offset to top" field, which contains the displacement to the
top of the object from the corresponding vtable pointer as a `ptrdiff_t`
(`isize`), and the "typeinfo pointer" field which points to the typeinfo object
and is null when building with -fno-rtti. The VTable pointer points after these
fields to the beginning of the virtual function pointer list.

While these extra fields would generally not be accessed in -fno-rtti
situations, gcc and clang still support `dynamic_cast<void*>` even when
-fno-rtti is passed, meaning that the "offset to top" field should be present.

Although I was unable to find documentation for the C++ ABI used on Darwin, it
appears to behave the same as the Itanium C++ ABI when it comes to VTable
layout.

In order to include these fields in the manual vtables built by the rust-xpcom
macros, a `&'static VTableExtra<VTableType>` is used instead of directly using
the vtable type, and the vtable reference stored in the struct is offset into
the allocation.

As the only platform I know of to not include these extra fields is Windows,
they are generated on all non-Windows platforms.

Differential Revision: https://phabricator.services.mozilla.com/D115085
2021-05-18 20:56:40 +00:00
Jens Stutte 05581ddca4 Bug 1678330: Ensure nested SpinEventLoopUntil(OrShutdown) calls are traceable to the originating source in case of crash. r=nika,extension-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D106839
2021-03-02 22:11:58 +00:00
Cosmin Sabou b2eb620ed0 Backed out changeset 03cae7800b41 (bug 1678330) for mochitest plain failures on test_window_open_discarded_bc.html. CLOSED TREE 2021-03-02 20:18:21 +02:00
Jens Stutte a0af9ea0a4 Bug 1678330: Ensure nested SpinEventLoopUntil(OrShutdown) calls are traceable to the originating source in case of crash. r=nika,extension-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D106839
2021-03-02 15:15:20 +00:00
Dan Glastonbury d22631c4d7 Bug 1679094 - Resolve dom::Promise from Rust. r=nika
A very limited interface to allow resolving dom::Promises from Rust code by
marshaling values via nsIVariant.

Differential Revision: https://phabricator.services.mozilla.com/D97905
2020-12-12 02:55:49 +00:00
Csoregi Natalia 3b68bf27c8 Backed out changeset cccdff68c790 (bug 1679094) for causing build bustage. CLOSED TREE 2020-12-12 03:18:44 +02:00
Dan Glastonbury 27752e15a3 Bug 1679094 - Resolve dom::Promise from Rust. r=nika
A very limited interface to allow resolving dom::Promises from Rust code by
marshaling values via nsIVariant.

Differential Revision: https://phabricator.services.mozilla.com/D97905
2020-12-12 00:47:23 +00:00
Dan Glastonbury 6c151a3362 Bug 1679095 - Extend nsstring to support creating void strings. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D97904
2020-12-12 00:43:30 +00:00
Xidorn Quan 8799a09b16 Bug 1661961 - Upgrade cstr to 0.2.x. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D98839
2020-12-07 08:01:04 +00:00
Emilio Cobos Álvarez 5716498fbd Bug 1677073 - Update in-tree version of env_logger. r=janerik
Also update plist to avoid pulling a duplicate humantime version.

Differential Revision: https://phabricator.services.mozilla.com/D96995
2020-11-19 14:03:43 +00:00
Sylvestre Ledru 691f01a663 Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio,webdriver-reviewers,jgraham
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D97397
2020-11-19 12:00:28 +00:00
Dan Glastonbury 6cb0652b73 Bug 1677676 - P5: Allow clippy lints we're not interested in. r=nika
Depends on D97264

Differential Revision: https://phabricator.services.mozilla.com/D97265
2020-11-17 15:29:28 +00:00
Dan Glastonbury 47f1273a88 Bug 1677676 - P4: Remove extra field name in $StringRepr creation. r=nika
Depends on D97263

Differential Revision: https://phabricator.services.mozilla.com/D97264
2020-11-17 15:24:07 +00:00
Dan Glastonbury 4dd101cdc9 Bug 1677676 - P3: Use pointer casts instead of mem::transmute. r=nika
Clippy doesn't like mem::transmute.

Depends on D97262

Differential Revision: https://phabricator.services.mozilla.com/D97263
2020-11-17 15:22:56 +00:00
Dan Glastonbury 3e7ecbc8a0 Bug 1677676 - P2: Replace use of .offset(_ as isize) with .add(_). r=nika
Depends on D97261

Differential Revision: https://phabricator.services.mozilla.com/D97262
2020-11-17 15:21:17 +00:00
Dan Glastonbury 49b9c1b5c6 Bug 1677676 - P1: Correctly implement unsafe FFI functions. r=nika
Use:
```rust
pub unsafe extern "C" fn foo() {
    ...
}
```

instead of:
```rust
pub extern "C" foo() {
    unsafe { ... }
}
```

Differential Revision: https://phabricator.services.mozilla.com/D97261
2020-11-17 15:20:41 +00:00
Alexis Beingessner 276b0a83da Bug 1674773 - Use the dummy-load-as-a-fence trick for refptr.rs. r=nika
This also introduces a thread_sanitizer feature to gkrust for any other
crates that need similar special handling. (`cfg(sanitizer="thread")` is
unfortunately an unstable feature, so it isn't useful here.)

Differential Revision: https://phabricator.services.mozilla.com/D95950
2020-11-10 21:11:58 +00:00
Mike Hommey 5f83f09c93 Bug 1674947 - Fix warning: getting the inner pointer of a temporary `CString`. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D95960
2020-11-09 08:31:28 +00:00
Cosmin Sabou f2556d47da Backed out 2 changesets (bug 1674773) for turning Bug 1646925 into almost permafail.
Backed out changeset acd441508a66 (bug 1674773)
Backed out changeset 89babec1b885 (bug 1674773)
2020-11-10 11:27:50 +02:00
Alexis Beingessner 297ab08c2d Bug 1674773 - Use the dummy-load-as-a-fence trick for refptr.rs. r=nika
This also introduces a thread_sanitizer feature to gkrust for any other
crates that need similar special handling. (`cfg(sanitizer="thread")` is
unfortunately an unstable feature, so it isn't useful here.)

Differential Revision: https://phabricator.services.mozilla.com/D95950
2020-11-09 20:14:44 +00:00
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
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
Dan Glastonbury 38f9a7cc9f Bug 1660393 - P2: Add `Future` execution support. r=nika
Allow Rust Futures to be polled to completion on the current thread's
`nsIEventTarget`.

Futures don't need to be `Send` since they are polled on the thread spawning the
task responsible to completing the Future.

Differential Revision: https://phabricator.services.mozilla.com/D89694
2020-09-22 00:39:37 +00:00
Dan Glastonbury 21660d203d Bug 1660393 - P1: Add support to moz-task to spin event loop. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D89693
2020-09-18 16:23:39 +00:00
Sylvestre Ledru fd8b54c40d Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio,necko-reviewers,valentin
# ignore-this-changeset

Depends on D90793

Differential Revision: https://phabricator.services.mozilla.com/D90794
2020-09-20 16:09:26 +00:00
Nika Layzell e5976b05e4 Bug 1664526 - Support generics when implementing xpcom interfaces in Rust, r=emilio,kamidphish
When I originally wrote rust-xpcom support, it wasn't possible to implement
generic vtables in Rust. With updates and improvements to the language since
then, it is now possible to do, so this patch adds support for implementing
xpcom interfaces on generic structs.

All generic parameters to these structs are required to have a `'static`
lifetime bound, as it is not possible to safely represent xpcom interface
objects which contain internal non-'static references.

Differential Revision: https://phabricator.services.mozilla.com/D89950
2020-09-16 00:01:36 +00:00
Alexis Beingessner e5dd298d13 Bug 1654807 - update thin-vec to 0.2.1 for potential endianess fix. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D87019
2020-09-14 17:32:40 +00:00
Nika Layzell c101f161b6 Bug 1664525 - Part 4: Various derive(xpcom) proc_macro style improvements, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D89949
2020-09-11 20:19:06 +00:00
Nika Layzell dfbf9d4094 Bug 1664525 - Part 3: Improve errors produced by #[derive(xpcom)], r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D89948
2020-09-11 20:19:04 +00:00
Nika Layzell 4e658d39b8 Bug 1664525 - Part 2: Use NonNull in xpcom RefPtr, r=emilio
Previously, this code used a &'static T in order to get the null pointer
optimization. Since the code was written, `NonNull` has been stabilized, and now
should be used instead.

Differential Revision: https://phabricator.services.mozilla.com/D89947
2020-09-11 20:19:02 +00:00
Nika Layzell 7b154ea902 Bug 1664525 - Part 1: Update various xpcom crates to rust2018, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D89946
2020-09-11 20:19:00 +00:00
Emily McDonough 22fb22631b Bug 1662518 part 1 - Add semver to gkrust_util r=emilio
We will use this for CUPS version parsing.

Differential Revision: https://phabricator.services.mozilla.com/D89034
2020-09-02 23:49:02 +00:00
Nika Layzell 4f3ae7b794 Bug 1659720 - Fix name in xpcom authors, r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D87445
2020-08-18 14:09:51 +00:00
Nika Layzell b4a607fc7c Bug 1650456 - Correct name in a few places, r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D82217
2020-07-03 20:20:29 +00:00
lougeniac64 499048fe86 (Bug 1635487) Wired up sync logging for extension pref storage r=lina,markh
Differential Revision: https://phabricator.services.mozilla.com/D80975
2020-06-27 19:15:17 +00:00
Csoregi Natalia 5bb8a015e6 Backed out changeset 8cd7fabbe270 (bug 1635487) for multiple leaks. CLOSED TREE 2020-06-27 10:43:15 +03:00
lougeniac64 bce2c33963 (Bug 1635487) Wired up sync logging for extension pref storage r=lina,markh
Differential Revision: https://phabricator.services.mozilla.com/D80975
2020-06-27 06:26:22 +00:00
Razvan Maries eb909a6e55 Backed out changeset fec02fef5e73 (bug 1635487) for Android bustages. CLOSED TREE 2020-06-27 03:05:27 +03:00
lougeniac64 893cb93c43 (Bug 1635487) Wired up sync logging for extension pref storage r=lina,markh
Differential Revision: https://phabricator.services.mozilla.com/D80975
2020-06-26 21:19:17 +00:00