This patch enables flake8 rule E713:
"test for membership should be 'not in'" in toolkit/components/telemetry
by removing the relative E713 entry from toolkit/components/telemetry/.flake8
and fixing the files for which the E713 error was reported.
Precisely 6 errors violating E713 rule were found and solved.
MozReview-Commit-ID: 2AaYGgVkxbU
--HG--
extra : rebase_source : 5f655591a18c4d0b2e7189732ebd8db0f20b0c6a
mTelemetryProvider might be empty if |CancelUpdate| is called during update.
In that scenario, the call flow will look like:
CancelUpdate -> UpdateError -> DownloadDone -> set mTelemetryProvider to empty ->
OnStartRequest -> record telemetry with empty key.
So in this patch, move mTelemetryProvider.Truncate() to OnStopRequest.
MozReview-Commit-ID: JDgNUqR4SKa
--HG--
extra : rebase_source : 42aa4c898f403a1189e67e355246ebed5aa4af44
This patch enables flake8 rule E222:
"multiple spaces after operator" in toolkit/components/telemetry
by removing the relative E222 entry from toolkit/components/telemetry/.flake8
and fixing the files for which the E222 error was reported.
Precisely 1 error violating E222 rule was found and solved.
MozReview-Commit-ID: 3xx09jkVu3E
--HG--
extra : rebase_source : 23c7ed40161e843ebe1b47fead2b00e4550b90ff
Enable the rule with the maximums set to avoid current failures, except for test_form_autocomplete which is very
high (82). The levels are set per major area, with existing warnings being changed to errors.
MozReview-Commit-ID: 37M6Ry0Mr1c
--HG--
extra : rebase_source : 07e6864bdd945eb322499912dd702638430c0365
This change automatically evicts content scripts 5 minutes after their last
use, and flushes the entire cache whenever a memory-pressure event is
received.
In the case of memory-pressure events other than heap-minimize, we only evict
scripts that have been in the cache for longer than 3 seconds (which is a
fairly arbitrary number) in order to prevent pre-loads from being evicted and
then immediately re-loaded.
MozReview-Commit-ID: LCXkI9qVMxS
--HG--
extra : rebase_source : b81ed3b9962346154fa18eaee58a7411244a1936
This uses the http-on-opening-request observer that's dispatched in the child
process to begin preloading matching content scripts as early in the load
cycle as possible. Ideally we would use the network predictor for this, but
most of its prediction work happens in the parent process, and there are no
simple ways for us to hook into it.
This currently does not do any pre-loading in the parent process, mainly
because there isn't a good way to distinguish top-level document loads that
are happening directly in the parent versus those that are being proxied from
the child.
MozReview-Commit-ID: dIQW68HtxZ
--HG--
extra : rebase_source : b36f6c8516d0550a0d5bb0df895ce6db76ab3538
Removed the probe in Histogram.json and the code related to it in nsKeygenHandler.cpp
MozReview-Commit-ID: E8lGbx19e2C
--HG--
extra : rebase_source : ef958749e6ad2e2b617fd1efdd09cdd3185bef18
nsTArray::AppendElement may cause memory reallocation if out of capacity.
In nsUrlClassifierStreamUpdater::FetchNextRequest(), we take the reference of
the first element of mPendingRequests and pass its member as reference to
DownloadUpdate(), where mPendingRequests.AppendElement will be called.
If the AppendElement in DownloadUpdate() causes realloc, the reference
becomes dangling.
The most efficient fix is to "move" the reference's (i.e. request)
member variables to DownloadUpdate() but I think in this case we can just
take the value from the array and pass it around with no given that the
array element contains simply a couple of strings and pointers.
MozReview-Commit-ID: KEZ5d3l3HoI
--HG--
extra : rebase_source : 4bf61a8a6f6bc57523dfbb7e5b0b40b7ce77a57a
This problem only occurs when optgroups are involved since they introduce recursion in to the menu-building code and we weren't correctly passing state through
the recursion.
MozReview-Commit-ID: 514zcjgXbIY
--HG--
extra : rebase_source : fdb9309ec8b08f5ab8ca77d901065d5e7db1617f