To get this fix: https://github.com/mozilla/application-services/pull/3235
Updated as follows:
```
sed -i 's/e8d7530319fa6c20d9de78d031c9398630eca3cd/61dcc364ac0d6d0816ab88a494bbf20d824b009b/g' services/fxaccounts/rust-bridge/firefox-accounts-bridge/Cargo.toml services/sync/golden_gate/Cargo.toml toolkit/components/extensions/storage/webext_storage_bridge/Cargo.toml toolkit/components/glean/Cargo.toml toolkit/library/rust/shared/Cargo.toml
./mach vendor rust
```
Verified by running the new regression test that I added in the bug:
```
./mach test toolkit/components/extensions/test/xpcshell/test_ext_storage_{local,sync,sync_kinto}.js
```
Differential Revision: https://phabricator.services.mozilla.com/D79628
This is the logic of tracing the WebGPU API calls at the level of wgpu-core,
serialized into a folder of choosing on the user drive. Traces are extremely portable,
they can be shared (on BugZilla) and then replayed on the developer machine,
which can have a different architecture from the users machine.
The standalone player is introduced in `gfx/wgpu/player`, similar to WebRender's Wrench.
The output dir is controlled by "dom.webgpu.traceDir" pref. No tracing happens if it's empty.
Differential Revision: https://phabricator.services.mozilla.com/D73333
This is the logic of tracing the WebGPU API calls at the level of wgpu-core,
serialized into a folder of choosing on the user drive. Traces are extremely portable,
they can be shared (on BugZilla) and then replayed on the developer machine,
which can have a different architecture from the users machine.
The standalone player is introduced in `gfx/wgpu/player`, similar to WebRender's Wrench.
The output dir is controlled by "dom.webgpu.traceDir" pref. No tracing happens if it's empty.
Differential Revision: https://phabricator.services.mozilla.com/D73333
TSan returns false positives for `lazy_static`. While we could
blocklist it, `once_cell` has equivalent functionality, but with a more
modern API, so let's use it instead.
Depends on D75864
Differential Revision: https://phabricator.services.mozilla.com/D76342
This function ought to be declared by `winapi`, but is not, for whatever
reason. However, its definition is stable enough that we can just
declare it inline rather than invoking bindgen every single build (and
unnecessarily compiling a build script on non-windows platforms) to
discover its definition for us.
Differential Revision: https://phabricator.services.mozilla.com/D76015
The upgrade of mp4parse pulled some code that previously was eliminated as
dead code in libxul. That code was unfortunately unreproducible as it
was generating a random seed at compile time. This was due to hashbrown
enabling the ahash feature that does that, but that was changed in 0.7.2.
Differential Revision: https://phabricator.services.mozilla.com/D75033
* Avoid misdetecting windows-1252 English as windows-1254.
* Avoid misdetecting windows-1252 English as IBM866.
* Avoid misdetecting windows-1252 English as GBK or EUC-KR.
* Improve Chinese and Japanese detection by not giving single-byte encodings score for letter next to digit.
* Improve Italian, Portuguese, Castilian, Catalan, and Galician detection by taking into account ordinal indicator use.
* Reduce lookup table size.
Differential Revision: https://phabricator.services.mozilla.com/D73237
This requires --build-peers-said-large-imports-were-ok since
third_party/rust/mp4parse/src/lib.rs is 113KB. This code is just moving from
media/mp4parse-rust to third_party/rust, so it's not really adding to net code
size.
Differential Revision: https://phabricator.services.mozilla.com/D74488
When building in some configurations of rustc (e.g. i386 without SSE), building Firefox fails with, among other things:
```
error[E0428]: the name `U1024` is defined multiple times
```
This comes from the typenum library. The issue was fixed in 14a3322d10, so all it takes is an upgrade of the crate.
Differential Revision: https://phabricator.services.mozilla.com/D74005
This commit adds syncing support to the `StorageSyncArea` class, via
the Golden Gate library.
It also changes the `BridgedEngine` trait: `initialize` and `finalize`
haven't been useful in practice, since that's managed by the storage
service, and the `LazyStore` takes care of setting up the storage
connection on first use. But, what we do need is a way to signal a
sync is starting, so that the engine can set up temp tables. That's
handled by the new `sync_started`.
Finally, this commit changes `BridgedEngine::set_uploaded` to take a
`sync15_traits::Guid` instead of a `String`.
Differential Revision: https://phabricator.services.mozilla.com/D73415
This commit splits `CryptoWrapper` into a base `RawCryptoWrapper`
class, which only handles encryption and decryption without
parsing the cleartext's contents, and the existing `CryptoWrapper`
class, which works like before.
Our bridged engine subclasses `RawCryptoWrapper`, and
implements some methods to convert records to and from envelopes.
Envelopes are a concept we introduced in `sync15_traits` to pass
along metadata from the BSO wrapper (like the modified time from the
server, and ID, to ensure they match) in addition to the cleartext.
This lets us reuse `sync15_traits::Payload` to parse record payloads
in Rust, and avoids parsing the cleartext in JS, only to stringify it
again when we pass it to the bridged Rust engine.
Differential Revision: https://phabricator.services.mozilla.com/D73581
This commit adds a `mozIInterruptible` implementation to
`StorageSyncArea`, and changes `LazyStore` to get an a-s interrupt
handle and interrupt pending operations.
Differential Revision: https://phabricator.services.mozilla.com/D73414
This commit removes the `nsICancelable` return values from all
`mozIBridgedSyncEngine` methods, and replaces them with a
`mozIInterruptible` interface that can be implemented by store
classes that support interrupting.
The `nsICancelable` pattern was intended to make each operation
interruptible, without affecting the others. But we can't guarantee
that with SQLite, because it only has a way to interrupt all
running statements on a connection, not specific ones. Further,
this pattern doesn't match what we currently do in a-s, where we
create an internal "interrupt scope" for each operation, and hand
out an "interrupt handle" for interrupting all in-progress
operations.
Storage classes like `StorageSyncArea` can opt in to interruption
by implementing `mozIInterruptible`. It's a separate interface to
protect against accidental misuse: because it interrupts all
statements on the connection, it might lose writes if the current
operation is a `set`, for example. But it's useful for testing and
debugging, so we still expose it.
This commit also changes Golden Gate ferries to hold weak references to
the `BridgedEngine`, so that they don't block teardown.
Differential Revision: https://phabricator.services.mozilla.com/D73413
the drop order of adapter fields made it so the handle to DX12 DLL was dropped before
the last resources are destroyed.
Differential Revision: https://phabricator.services.mozilla.com/D73456
This commit wires up `StorageSyncArea::teardown()` to call the new
`webext_storage::Store::close()` method.
It also changes `teardown` to drop the `LazyStore`, and thus close its
database connection, on the main thread if dispatching to the task
queue fails. Dispatch should only fail at shutdown, and putting the
owned reference back only adds indirection, since the `StorageSyncArea`
will still drop its `LazyStore` later in shutdown.
Finally, it includes an xpcshell test fix for
https://github.com/mozilla/application-services/pull/3050.
Differential Revision: https://phabricator.services.mozilla.com/D72992
Now that `BridgedEngine` has been moved to `sync15_traits`, we can
remove `golden_gate_traits` from the tree, and change Golden Gate to
depend on `sync15_traits` directly.
This commit also adds a Cargo feature, `services_sync`, which reflects
the `MOZ_SERVICES_SYNC` config option. In the future, we'll use this
feature to gate implementations of `mozIBridgedSyncEngine`.
Differential Revision: https://phabricator.services.mozilla.com/D72784
The `webext_storage_bridge` crate introduced in this commit bridges the
`mozIExtensionStorageArea` XPCOM interface to the `webext_storage` Rust
component from Application Services.
This commit factors out the following parts from bug 1623245, so that
we can land them piecemeal:
* The `mozIExtensionStorageArea` interfaces, which implement all the
methods needed to support the `storage.sync` API.
* A Rust implementation of the above, in `StorageSyncArea`.
* A `StorageTask` type, for dispatching storage operations to a
background task queue.
* A `LazyStore`, which wraps the Rust component's `Store` and lazily
initializes it on the background queue the first time it's used.
* A `StorageSyncService`, which is our singleton. It holds on to a
configured `StorageSyncArea`, and hands out references to it via
`getInterface`. Eventually, we'll extend this to support syncing,
too.
Differential Revision: https://phabricator.services.mozilla.com/D71897
Hooray, our first Application Services Rust component! This is a
mechanical run of `mach vendor rust`, split out into its own commit
to make reviewing the Firefox bindings easier.
Differential Revision: https://phabricator.services.mozilla.com/D71895
The `webext_storage_bridge` crate introduced in this commit bridges the
`mozIExtensionStorageArea` XPCOM interface to the `webext_storage` Rust
component from Application Services.
This commit factors out the following parts from bug 1623245, so that
we can land them piecemeal:
* The `mozIExtensionStorageArea` interfaces, which implement all the
methods needed to support the `storage.sync` API.
* A Rust implementation of the above, in `StorageSyncArea`.
* A `StorageTask` type, for dispatching storage operations to a
background task queue.
* A `LazyStore`, which wraps the Rust component's `Store` and lazily
initializes it on the background queue the first time it's used.
* A `StorageSyncService`, which is our singleton. It holds on to a
configured `StorageSyncArea`, and hands out references to it via
`getInterface`. Eventually, we'll extend this to support syncing,
too.
Differential Revision: https://phabricator.services.mozilla.com/D71897
Hooray, our first Application Services Rust component! This is a
mechanical run of `mach vendor rust`, split out into its own commit
to make reviewing the Firefox bindings easier.
Differential Revision: https://phabricator.services.mozilla.com/D71895
A first Rust test, which should run without any interaction with
Firefox.
This will eventually break down when we get IPC in there.
Depends on D72128
Differential Revision: https://phabricator.services.mozilla.com/D72385
Currently there's no user, so we do some trickery to actually make sure
it gets compiled.
It also lacks a test, that will follow in the next commit,
as it's a bit more complex to set up a Glean instance for a test run.
Differential Revision: https://phabricator.services.mozilla.com/D72128
A first Rust test, which should run without any interaction with
Firefox.
This will eventually break down when we get IPC in there.
Differential Revision: https://phabricator.services.mozilla.com/D72385
Currently there's no user, so we do some trickery to actually make sure
it gets compiled.
It also lacks a test, that will follow in the next commit,
as it's a bit more complex to set up a Glean instance for a test run.
Differential Revision: https://phabricator.services.mozilla.com/D72128
Move more shader parsing code to webrender_build, so it can be used
both at runtime and build time.
At build time optimize a set of shaders and feature flag combinations,
using glslopt. Some features are skipped because they are not
supported by the gl version, because the optimizer does not support
them, or because webrender does not need them currently.
Use build-parallel to ensure the optimization is performed in parallel
using the make jobserver. Write the optimized shader source to a
hashmap to be used at runtime, in addition to the unoptimized source.
Differential Revision: https://phabricator.services.mozilla.com/D70032
This patch does not include the capability to read update URLs set by enterprise policy. That capability will be added later, when we add other enterprise policy support.
Differential Revision: https://phabricator.services.mozilla.com/D69062
binast only uses one function from Inflector and it doesn't require any
feature.
Differential Revision: https://phabricator.services.mozilla.com/D65862
--HG--
extra : moz-landing-system : lando
This commit moves the implementation of the wasmTextToBinary and wasmCodeOffets
functions to the JS shell.
Before this change, the implementation was in wasm/rust/. This commit moves the
implementation to js/rust, which is only compiled for the JS shell. The C++
bindings for the rust code is moved to the shell/ directory.
Differential Revision: https://phabricator.services.mozilla.com/D68650
--HG--
rename : js/src/wasm/rust/src/lib.rs => js/src/rust/wasm.rs
rename : js/src/wasm/WasmTesting.cpp => js/src/shell/WasmTesting.cpp
rename : js/src/wasm/WasmTesting.h => js/src/shell/WasmTesting.h
extra : moz-landing-system : lando
This commit adds a new crate for bridging Rust Sync engines to Desktop,
and a `mozIBridgedSyncEngine` for accessing the bridge via JS.
Naturally, the bridge is called Golden Gate. 😊 For more information
on how to use it, please see `golden_gate/src/lib.rs`.
Other changes include:
* Ensuring the test Sync server uses UTF-8 for requests and responses.
* Renaming `mozISyncedBookmarksMirrorLogger` to `mozIServicesLogger`,
and moving it into the shared Sync interfaces.
The `BridgedEngine` trait lives in its own crate, called
`golden_gate_traits`, to make it easier to eventually move into a-s.
`Interruptee` and `Interrupted` already exist in a-s, and are
duplicated in this crate for now.
Differential Revision: https://phabricator.services.mozilla.com/D65268
--HG--
extra : moz-landing-system : lando
This commit adds a new crate for bridging Rust Sync engines to Desktop,
and a `mozIBridgedSyncEngine` for accessing the bridge via JS.
Naturally, the bridge is called Golden Gate. 😊 For more information
on how to use it, please see `golden_gate/src/lib.rs`.
Other changes include:
* Ensuring the test Sync server uses UTF-8 for requests and responses.
* Renaming `mozISyncedBookmarksMirrorLogger` to `mozIServicesLogger`,
and moving it into the shared Sync interfaces.
The `BridgedEngine` trait lives in its own crate, called
`golden_gate_traits`, to make it easier to eventually move into a-s.
`Interruptee` and `Interrupted` already exist in a-s, and are
duplicated in this crate for now.
Differential Revision: https://phabricator.services.mozilla.com/D65268
--HG--
extra : moz-landing-system : lando
There is no need to use the Git repository, its only change compared to 0.1.6
is that some random tidbit has been fixed in the README file.
Depends on D69805
Differential Revision: https://phabricator.services.mozilla.com/D69806
--HG--
extra : moz-landing-system : lando
Pick commits:
- ea9e5aa: Implement a API to get `groupd_id` with special case handling (#69)
- d67d4d2: Revise prepush when deleting branch (#76)
- e5b0f97: Stop test immediately when error happens (#77)
- 98e59e5: Migrate from travis-ci.org to travis-ci.com
Differential Revision: https://phabricator.services.mozilla.com/D69647
--HG--
extra : moz-landing-system : lando
This commit updates the wat version in tree.
* Implements MVP GC syntax
* Updated abs SIMD opcodes
Differential Revision: https://phabricator.services.mozilla.com/D69405
--HG--
extra : moz-landing-system : lando
Pick commits:
- 432259a: Run `cargo fmt`
- c9f0499: Revert `derive(Debug)` removal (#75)
- f9abca8: Replace the custom input linear buffer by something based on ringbuf. (#74)
- 4eafcc8: Fix the resampler-calling code to use the correct semantic (#71)
- 828efbc: Merge pull request #72 from ChunMinChang/rm-debug-trait
Differential Revision: https://phabricator.services.mozilla.com/D69250
--HG--
extra : moz-landing-system : lando
Controlling is two things:
* initializing Glean
* toggling upload enabled.
Initializing also means setting the internal metrics (client info), some
of which we detect at build time.
`upload_enabled` will eventually be tied to the Firefox Telemetry upload preference.
Differential Revision: https://phabricator.services.mozilla.com/D68543
--HG--
extra : moz-landing-system : lando
This also upgrades the vendored Glean version, which thanks to our
upstream work doesn't change anything else (except one small
Mozilla-developed dependency)
It's still feature-gated to nightly.
In C++ there's now a `MOZ_GLEAN` define.
For Rust it's behind the `glean` feature (enabled on nightly only).
The `fog` crate is empty, so no Glean is actually instantiated.
Differential Revision: https://phabricator.services.mozilla.com/D68539
--HG--
rename : third_party/rust/glean-preview/src/metrics/mod.rs => toolkit/components/glean/src/lib.rs
extra : moz-landing-system : lando
Controlling is two things:
* initializing Glean
* toggling upload enabled.
Initializing also means setting the internal metrics (client info), some
of which we detect at build time.
`upload_enabled` will eventually be tied to the Firefox Telemetry upload preference.
Differential Revision: https://phabricator.services.mozilla.com/D68543
--HG--
extra : moz-landing-system : lando
This also upgrades the vendored Glean version, which thanks to our
upstream work doesn't change anything else (except one small
Mozilla-developed dependency)
It's still feature-gated to nightly.
In C++ there's now a `MOZ_GLEAN` define.
For Rust it's behind the `glean` feature (enabled on nightly only).
The `fog` crate is empty, so no Glean is actually instantiated.
Differential Revision: https://phabricator.services.mozilla.com/D68539
--HG--
rename : third_party/rust/glean-preview/src/metrics/mod.rs => toolkit/components/glean/src/lib.rs
extra : moz-landing-system : lando
Pick commits
- 20daa86: Revise git hooks (#68)
- 81d0024: Revise `destroy_cubeb_device_info` (#67)
- 1cc8a31: Add a hook to check that commits are formatted and linted correctly (#66)
- aa80b3f: Try using the model id as group id. (#64)
- ab31978: Bail if `cargo clippy` or `cargo fmt` fails (#65)
- 3860bb3: Fix comments in #57 (#63)
- ef5f58b: Run `cargo fmt` and make scripts executable (#62)
- a4c83db: Fix two bugs and add logs (#57)
Differential Revision: https://phabricator.services.mozilla.com/D68402
--HG--
extra : moz-landing-system : lando
Also update the update-rust.sh script in a couple ways:
- Stop copying the source for mp4parse_fallible into the tree; use crates.io
- Include submodules in mp4parse-rust checkout; needed for tests
- Exclude unnecessary build.rs from mp4parse_fallible, it was causing problems
- Update mp4rust_capi/Cargo.toml patch to exclude cdylib. It's only necessary for test_ffi and causes build problems otherwise
Differential Revision: https://phabricator.services.mozilla.com/D68139
--HG--
extra : moz-landing-system : lando
This commit removes the old WasmTextToBinary implementation and replaces
it with a stub that calls into the rust wat implementation.
The old wasmTextToBinary function took an optional boolean parameter to
indicate that additional metadata was desired. This extra metadata was
a list of offsets of instructions in the code section. I'm not sure if
this was intentional or not, but it looks like it only includes root
expressions of nested s-exprs.
These offsets were used in two tests, debug/wasm-breakpoints.js and a
wasm/regress test. Adding this functionality into 'wat' proved to be a large
change for a function that didn't seem to have much use cases. A new
wasmCodeOffsets function was added to replicate this feature. It's implemented
in rust using the 'wasmparser' crate that cranelift uses. When cranelift is
compiled, this shouldn't result in an increased binary size. If the compile
time or binary size proves to be an issue in non-cranelift builds, I think
we can make this a conditional feature for JS-shells only.
Differential Revision: https://phabricator.services.mozilla.com/D67245
--HG--
extra : moz-landing-system : lando
This commit removes the old WasmTextToBinary implementation and replaces
it with a stub that calls into the rust wat implementation.
The old wasmTextToBinary function took an optional boolean parameter to
indicate that additional metadata was desired. This extra metadata was
a list of offsets of instructions in the code section. I'm not sure if
this was intentional or not, but it looks like it only includes root
expressions of nested s-exprs.
These offsets were used in two tests, debug/wasm-breakpoints.js and a
wasm/regress test. Adding this functionality into 'wat' proved to be a large
change for a function that didn't seem to have much use cases. A new
wasmCodeOffsets function was added to replicate this feature. It's implemented
in rust using the 'wasmparser' crate that cranelift uses. When cranelift is
compiled, this shouldn't result in an increased binary size. If the compile
time or binary size proves to be an issue in non-cranelift builds, I think
we can make this a conditional feature for JS-shells only.
Differential Revision: https://phabricator.services.mozilla.com/D67245
--HG--
extra : moz-landing-system : lando
This commit removes the old WasmTextToBinary implementation and replaces
it with a stub that calls into the rust wat implementation.
The old wasmTextToBinary function took an optional boolean parameter to
indicate that additional metadata was desired. This extra metadata was
a list of offsets of instructions in the code section. I'm not sure if
this was intentional or not, but it looks like it only includes root
expressions of nested s-exprs.
These offsets were used in two tests, debug/wasm-breakpoints.js and a
wasm/regress test. Adding this functionality into 'wat' proved to be a large
change for a function that didn't seem to have much use cases. A new
wasmCodeOffsets function was added to replicate this feature. It's implemented
in rust using the 'wasmparser' crate that cranelift uses. When cranelift is
compiled, this shouldn't result in an increased binary size. If the compile
time or binary size proves to be an issue in non-cranelift builds, I think
we can make this a conditional feature for JS-shells only.
Differential Revision: https://phabricator.services.mozilla.com/D67245
--HG--
extra : moz-landing-system : lando
This patch removes the old thread_profiler bindings, and adds
support for profiling WR with the tracy profiler, which is a
much more advanced frame profiler.
Since it's very lightweight, and only instruments annotated CPU
and GPU zones, it can retain very large profiles, allowing
fine grained analysis of thread interactions, CPU spikes etc.
Differential Revision: https://phabricator.services.mozilla.com/D66926
--HG--
extra : moz-landing-system : lando
Updates `wgpu` code as well as our WebIDL bindings.
The `wgpu-types` is a new component crate that has public types available to
Rust applications that target the Web directly.
Differential Revision: https://phabricator.services.mozilla.com/D67013
--HG--
extra : moz-landing-system : lando
This is the skeleton for interacting with the Windows Task Scheduler, it
produces an exe that can register and unregister itself as a scheduled
task.
The schedule is to run once daily. Bug 1568287 is reserved for discussions
of other trigger patterns, possibly depending on the channel.
This uses a the Windows Event Log for logging, Bug 1343676 deals with
possibly extending that to a rotating log file.
Differential Revision: https://phabricator.services.mozilla.com/D35507
--HG--
extra : moz-landing-system : lando
CLOSED TREE
Backed out changeset 85ea1d36da66 (bug 1515451)
Backed out changeset 779bc1fa07ae (bug 1515451)
Backed out changeset 0c6771b60b76 (bug 1515451)
This is the skeleton for interacting with the Windows Task Scheduler, it
produces an exe that can register and unregister itself as a scheduled
task.
The schedule is to run once daily. Bug 1568287 is reserved for discussions
of other trigger patterns, possibly depending on the channel.
This uses a the Windows Event Log for logging, Bug 1343676 deals with
possibly extending that to a rotating log file.
Differential Revision: https://phabricator.services.mozilla.com/D35507
--HG--
extra : moz-landing-system : lando