Converts privacy.fuzzyfox.clockgrainus varcache pref to a static pref. This pref used two #define values, which I also removed.
Differential Revision: https://phabricator.services.mozilla.com/D41102
--HG--
extra : moz-landing-system : lando
test_list_json_searchdefault.js is repurposed, as the tests in the searchconfig sub-directory already check the default engine.
Differential Revision: https://phabricator.services.mozilla.com/D41035
--HG--
extra : moz-landing-system : lando
This also renames the existing infallible nsDocShell:GetBrowsingContext()
getter to BrowsingContextRef(), and changes the return type, since several
callers rely on it returning a raw pointer rather than an already_AddRefed.
Differential Revision: https://phabricator.services.mozilla.com/D40312
--HG--
extra : moz-landing-system : lando
Ranges don't cross documents, and there's no reason the typeahead find passes a
shell around. So just don't do it.
This also fixes a bug where references to frames were kept around a flush.
That's potentially unsafe, so I've avoided the flush by passing false to
nsRange.
If something depends on it all the callers need be audited and fixed to handle a
flush properly.
Depends on D40696
Differential Revision: https://phabricator.services.mozilla.com/D40697
--HG--
extra : moz-landing-system : lando
nsTypeAheadFind.cpp contains all of the callsites to this function, so it seems like a logical place for it to live.
Differential Revision: https://phabricator.services.mozilla.com/D40696
--HG--
extra : moz-landing-system : lando
APPLICATION_REPUTATION_BINARY is now replaced by APPLICATION_REPUTATION_BINARY_TYPE,
we can remove it from telemetry.
Depends on D37275
Differential Revision: https://phabricator.services.mozilla.com/D37276
--HG--
extra : moz-landing-system : lando
This patch adds a telemetry, APPLICATION_REPUTATION_BINARY_TYPE, which
records different binary type based on the file extension.
1. BinaryFile, file is considered as a binary file, file is eligible for remote lookup
2. NonBinaryFile, file is not considered as a binary file.
3. MozNonBinaryFile, file is considered as a binary file in Chrome, but we don't
send a download protection ping for this file
4. UnknownFile, file is not in any of the above lists.
Differential Revision: https://phabricator.services.mozilla.com/D37275
--HG--
extra : moz-landing-system : lando
This patch ressurects HiddenFrame.jsm and uses it when handling
the --screenshot command line argument to load the requested page
in a content process. The actual logic for grabbing the image is
also ported to a JSWindowActor. The test for this feature remains
suboptimal as described in the bug.
Differential Revision: https://phabricator.services.mozilla.com/D40148
--HG--
rename : browser/components/shell/HeadlessShell.jsm => browser/components/shell/ScreenshotChild.jsm
extra : moz-landing-system : lando
All built-in engines have migrated from OpenSearch to WebExtensions.
WebExtensions do not support resource: or chrome:-URLs in their
`favicon_url` field, so the "resource:" and "chrome:" URLs can only be
used by external opensearch XML files. These should not rely on internal
resources from omni.ja, as the bug shows. So just drop support for
"chrome:" and "resource:"-URLs, as we don't need them any more.
Current OpenSearch engines that relied on chrome/resource:-URLs can
either replace the URL with a data:-URL, or migrate to WebExtensions.
Differential Revision: https://phabricator.services.mozilla.com/D40345
--HG--
extra : moz-landing-system : lando
This patch ressurects HiddenFrame.jsm and uses it when handling
the --screenshot command line argument to load the requested page
in a content process. The actual logic for grabbing the image is
also ported to a JSWindowActor. The test for this feature remains
suboptimal as described in the bug.
Differential Revision: https://phabricator.services.mozilla.com/D40148
--HG--
rename : browser/components/shell/HeadlessShell.jsm => browser/components/shell/ScreenshotChild.jsm
extra : moz-landing-system : lando
Refactor the gtest code because it confused me while adding new tests.
This patch focus on refining utility function but it also contains other
minor refinements.
Changes includes:
1. Add comments to utility function
2. Move common utility functions to Common.cpp and remove duplicates
3. Header file removal and reorder
4. Unify MPL commnetc
5. Replace anonymouse namespace with static function
Differential Revision: https://phabricator.services.mozilla.com/D37532
--HG--
extra : moz-landing-system : lando
This patch modifies `DllServices::Get()` to use a magic static to initialize
itself, thus ensuring atomicity and thread safety.
We also remove a redundant kung-fu death grip, as it causes
`DllServices->EnableFull` to reenter `DllServices::Get` but is unnecessary.
Differential Revision: https://phabricator.services.mozilla.com/D40891
--HG--
extra : moz-landing-system : lando
This patch introduces a new Rust crate called `static_prefs`.
It also changes generate_static_pref_list.py to generate two new files.
- StaticPrefsCGetters.cpp: contains C getters, which are just wrappers around
the C++ getters. This is included into Preferences.cpp.
- static_prefs.rs: contains declarations for the C getters, plus the `pref!`
macro which provides nice syntax for calling the C getters. This is included
into static_prefs/src/lib.rs.
The new code is only generated for prefs marked with the new `rust` field in
the YAML. It's opt-in because there's no point generating additional code for
900+ static prefs when only about 20 are currently used from Rust.
This patch only marks a single pref (`browser.display.document_color_use`) with
`rust: true`. That pref isn't accessed from Rust code in this patch, but it's
necessary because the generated Rust code is invalid if there are zero
Rust-accessed prefs. (The next patch will access that pref and others from Rust
code.
Differential Revision: https://phabricator.services.mozilla.com/D40791
--HG--
extra : moz-landing-system : lando
Before this change, the bookmarks mirror used a cloned Places
connection for reads and writes. This avoided interleaving writes from
Sync and other Places consumers, where `mozStorageTransaction` or
`Sqlite.jsm` would see that a transaction was already in progress, and
execute statements as part of that transaction.
However, using a separate connection caused write contention, wedging
the main connection in an infinite `SQLITE_BUSY` retry loop. This
blocked all writes to Places until shutdown, at which point we'd hang
waiting to shut down the async thread. Bug 1435446 reduced this, but
didn't eliminate the hangs entirely.
Since the mirror first landed, we've made three changes, to the point
that using the main connection is feasible now:
1. Merging and application happen in Rust. This means we run everything
on the async thread, so no other async statements can run during
merging.
2. Most uses of the synchronous bookmarks API have been removed. The
only remaining caller is the tagging service, and we never sync the
tags root.
3. We only update parents and positions for items that actually changed,
instead of walking the entire tree.
To that end, this commit removes the cloned connection, and uses the
main Places connection directly.
Differential Revision: https://phabricator.services.mozilla.com/D39890
--HG--
extra : moz-landing-system : lando
This commit reduces the number of database writes and table scans
needed to merge synced bookmarks.
* Remove `fetchNew{Local, Remote}Contents`. Fetching the tree already
scans the table, so we can piggyback on it to fetch content info for
deduping.
* Store completion ops in temp tables to only update changed parts of
the local tree, and remove the `mergeStates` table and views.
* Replace the `itemsToMerge` view with an indexed `itemsToApply` temp
table.
* Replace the `updateGuidsAndSyncFlags` trigger with a `changeGuidOps`
table and a `changeGuids` trigger.
* Replace the `updateLocalItems` trigger with an `apply_remote_items`
function to bulk upsert new and updated items.
* Replace the `structureToMerge` view with an
`applyNewLocalStructureOps` table that holds parents and positions
for moved items, and an `applyNewLocalStructure` trigger to update
them.
* Remove tombstones for revived items, update change counters, and flag
mirror items as merged directly in `update_local_items_in_places`,
instead of indirecting through temp tables.
* Don't mark items flagged for reupload as merged, since we'll write
them back to the mirror after upload.
* Use a scalar subquery instead of a join in the `localTags` view to
look up the tags root ID.
* Replace `relatedIdsToReupload` with a `Store::prepare` method that
flags all bookmarks with keyword-URL mismatches for reupload.
* Trigger frecency updates for origins once, not for every item.
* Remove two extra scans on `itemsAdded` and `itemsChanged` when
recording observer notifications for changed keywords.
* Notify all `bookmark-added` listeners in a single batch.
This also fixes some edge cases:
* Update root positions correctly after deleting a non-syncable root
or item.
* Keyword-URL mismatches may reupload more items than before, but now
ensure that all bookmarks with the same URL have the same keyword.
* Only set items with deduped GUIDs to `SYNC_STATUS_NORMAL` after
merging.
* Bump the last modified time for modified items only.
Differential Revision: https://phabricator.services.mozilla.com/D39889
--HG--
extra : moz-landing-system : lando