Since distribution search engines have all moved into mozilla-central, so we no longer need to check the loadPath, which potentially wasn't reliable anyway.
Addtionally, we don't need to check `extensions.installedDistroAddon` since these are built-in add-ons, and distributions don't install search engines separately.
Differential Revision: https://phabricator.services.mozilla.com/D72743
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
Three of the about:memory tests have failures when they are run locally. In all
three cases it is due to the tests expecting a socket process that isn't
present. On automation the tests succeed with or without the socket process
code.
Bug 1515390 introduced the socket process code. These tests now run as "1proc"
tests, which might explain why this socket process code is no longer necessary.
This commit removes the socket process code, which means the tests now succeed
when run locally. No change is seen on automation, where the tests still pass.
Differential Revision: https://phabricator.services.mozilla.com/D73582
Since distribution search engines have all moved into mozilla-central, so we no longer need to check the loadPath, which potentially wasn't reliable anyway.
Addtionally, we don't need to check `extensions.installedDistroAddon` since these are built-in add-ons, and distributions don't install search engines separately.
Differential Revision: https://phabricator.services.mozilla.com/D72743
The cast in InitWithNode is wrong. AsElement() asserts instead of
checking the flag, so we always pass an element (and if we didn't we'd
have type confusion problems). I audited the callers and we're fine.
Anyhow, always require an element, and add two convenience constructors
for C++ code.
Differential Revision: https://phabricator.services.mozilla.com/D73636
This patch adds an optional boolean field `isDependent`
to the third-party-modules ping whose value is copied
from `ProcessedModuleLoadEvent::mIsDependent`.
Differential Revision: https://phabricator.services.mozilla.com/D67883
This patch adds a boolean field `mIsDependent` indicating whether a module was
loaded via the executable's Import Directory Table or not.
This patch also partially reverts Bug 1587539, moving a logic to detect Import
Directory tampering to `PEHeaders`'s ctor. With this, we can skip generating
a map of the executable's dependent modules if no tampering is detected.
Differential Revision: https://phabricator.services.mozilla.com/D66274
The cast in InitWithNode is wrong. AsElement() asserts instead of
checking the flag, so we always pass an element (and if we didn't we'd
have type confusion problems). I audited the callers and we're fine.
Anyhow, always require an element, and add two convenience constructors
for C++ code.
Differential Revision: https://phabricator.services.mozilla.com/D73636
Now that upstream winchecksec builds and works natively on Linux, use
that. That should solve the random crashes under Wine. If random crashes
still happen, it will be easier to debug anyways.
We bump to the last version that doesn't use vcpkg because vcpkg makes
things more difficult.
Differential Revision: https://phabricator.services.mozilla.com/D73405
This patch uses TRRPerformance.jsm to get the fastest TRR and store it in a pref
before running DoH heuristics. The chosen TRR URI is sent in a telemetry event.
Differential Revision: https://phabricator.services.mozilla.com/D72790
These support the new implementation of the addon blocklist (bug 1620621),
which is a more space-efficient way to represent the blocklist.
A comparison of file size was given in D73159. In short, 913KB for the
old JSON-based blocklist (addons.json), 64KB for the new one.
In practice, addons.json is 273KB compressed.
The new blocklist (addons-mlbf.bin) does not compress that well since it
is already an efficiently packed binary format.
Differential Revision: https://phabricator.services.mozilla.com/D73438
Emphasize that `signedDate` is a `Date` instance instead of a number,
because this is the actual type of the addon wrappers exposed by the
AddonManager.
And replace check for signedState with signedDate, because the latter
captures my intent (the original implementation checked signedState
because signedDate used to unconditionally return a `Date` instance,
even for invalid dates, but that was changed in bug 1583844).
Differential Revision: https://phabricator.services.mozilla.com/D73463
This check was done in GetNextNonEmptyTextFragmentInSameBlock which I
removed in bug 1627643.
Hopefully the fuzzer finds an easy reduced test-case to land as a
crashtest, otherwise I can try to construct one.
Differential Revision: https://phabricator.services.mozilla.com/D72926
That avoids having two sources of truth. This might be better, still
unsure how I feel about it compared to the current setup.
Differential Revision: https://phabricator.services.mozilla.com/D73427
Bug 1633938 re-introduced this field to handle full-zoom on RDM without
having to affect the actual content zoom, see related hacks that went
away in this push:
9e6925ea79
But I added it to the browser element constructor, instead of to
resetFields(), which means that it's not properly reset when the
browsing context changes and thus it can get out of sync.
Move it to resetFields(), so that we properly detect that zoom has
changed. An alternative to this is to only use this._fullZoom when in
RDM instead.
This is where a similar field only used for remote browser used to live
before my Fission zoom changes:
https://searchfox.org/mozilla-central/rev/9642a113737b556750228965bb9cbd3aaa655e22/toolkit/content/widgets/browser-custom-element.js#346
Differential Revision: https://phabricator.services.mozilla.com/D73426