Follow-up to bbcc7547a3 which cleaned up browser/. This strips the
same modelines from the rest of the tree, excluding paths listed in
tools/rewriting/ThirdPartyPaths.txt.
Differential Revision: https://phabricator.services.mozilla.com/D295577
Replaces `MOZ_BIG_ENDIAN()` with testing for `std::endian::native == std::endian::big`. In
statement contexts `if constexpr` is used to mark the condition as a compile-time constant.
The only remaining `MOZ_BIG_ENDIAN()` uses are in "modules/fdlibm/src/math_private.h"
and will get updated in parts 4-5.
Adds explicit includes to "mozilla/EndianUtils.h" for files which previously
only transitively included it through "mozilla/HashTable.h".
Differential Revision: https://phabricator.services.mozilla.com/D288177
This reverts commit 5d8e0746eb.
Revert "Bug 2023878 - Part 6: Remove MOZ_LITTLE_ENDIAN and MOZ_BIG_ENDIAN. r=sergesanspaille"
This reverts commit 634b3e1287.
Revert "Bug 2023878 - Part 5: Reimport fdlibm with updated patches. r=sergesanspaille"
This reverts commit 5ed2376e75.
Revert "Bug 2023878 - Part 4: Replace MOZ_LITTLE_ENDIAN and MOZ_BIG_ENDIAN in fdlibm. r=sergesanspaille"
This reverts commit 36dad49d5b.
Revert "Bug 2023878 - Part 3: Replace MOZ_LITTLE_ENDIAN uses with std::endian::little. r=sergesanspaille,media-playback-reviewers,padenot"
This reverts commit e89c61d064.
Revert "Bug 2023878 - Part 2: Replace MOZ_BIG_ENDIAN uses with std::endian::big. r=sergesanspaille,media-playback-reviewers,profiler-reviewers,canaltinova,padenot,necko-reviewers,dom-storage-reviewers,jesup"
This reverts commit be3c506fcf.
Revert "Bug 2023878 - Part 1: Use std::endian for mozilla::detail::Endianness. r=sergesanspaille"
This reverts commit dc96d4abe8.
Replaces `MOZ_BIG_ENDIAN()` with testing for `std::endian::native == std::endian::big`. In
statement contexts `if constexpr` is used to mark the condition as a compile-time constant.
The only remaining `MOZ_BIG_ENDIAN()` uses are in "modules/fdlibm/src/math_private.h"
and will get updated in parts 4-5.
Adds explicit includes to "mozilla/EndianUtils.h" for files which previously
only transitively included it through "mozilla/HashTable.h".
Differential Revision: https://phabricator.services.mozilla.com/D288177
This is a large number of largely mechanical changes. When possible, the code
was called to directly call `.get()` instead, performing the assertions
manually. In many places PromiseFlatCString() calls were added to dynamically
copy the strings into null terminated buffers if the string was not null
terminated.
Differential Revision: https://phabricator.services.mozilla.com/D286158
Replaces `MOZ_BIG_ENDIAN()` with testing for `std::endian::native == std::endian::big`. In
statement contexts `if constexpr` is used to mark the condition as a compile-time constant.
The only remaining `MOZ_BIG_ENDIAN()` uses are in "modules/fdlibm/src/math_private.h"
and will get updated in parts 4-5.
Adds explicit includes to "mozilla/EndianUtils.h" for files which previously
only transitively included it through "mozilla/HashTable.h".
Differential Revision: https://phabricator.services.mozilla.com/D288177
This reverts commit b87ffb6683.
Revert "Bug 2023878 - Part 6: Remove MOZ_LITTLE_ENDIAN and MOZ_BIG_ENDIAN. r=sergesanspaille"
This reverts commit e262fd1d8a.
Revert "Bug 2023878 - Part 5: Reimport fdlibm with updated patches. r=sergesanspaille"
This reverts commit 8a7a4af30f.
Revert "Bug 2023878 - Part 4: Replace MOZ_LITTLE_ENDIAN and MOZ_BIG_ENDIAN in fdlibm. r=sergesanspaille"
This reverts commit fc0465acf1.
Revert "Bug 2023878 - Part 3: Replace MOZ_LITTLE_ENDIAN uses with std::endian::little. r=sergesanspaille,media-playback-reviewers,padenot"
This reverts commit 965507e925.
Revert "Bug 2023878 - Part 2: Replace MOZ_BIG_ENDIAN uses with std::endian::big. r=sergesanspaille,media-playback-reviewers,profiler-reviewers,canaltinova,padenot"
This reverts commit 43b7f808c4.
Revert "Bug 2023878 - Part 1: Use std::endian for mozilla::detail::Endianness. r=sergesanspaille"
This reverts commit 75f5c71b30.
Replaces `MOZ_BIG_ENDIAN()` with testing for `std::endian::native == std::endian::big`. In
statement contexts `if constexpr` is used to mark the condition as a compile-time constant.
The only remaining `MOZ_BIG_ENDIAN()` uses are in "modules/fdlibm/src/math_private.h"
and will get updated in parts 4-5.
Adds explicit includes to "mozilla/EndianUtils.h" for files which previously
only transitively included it through "mozilla/HashTable.h".
Differential Revision: https://phabricator.services.mozilla.com/D288177
Replace repeated Preferences::GetBool/GetCString calls with cached values
updated via Preferences::RegisterCallbackAndCall()
The cached values are lazily initialized on first access and cleaned up via
RunOnShutdown.
Differential Revision: https://phabricator.services.mozilla.com/D284520
Introduce real-time SafeBrowsing lookup infrastructure. Refactor hash completion
handling by extracting nsUrlClassifierHashCompleterBase as a common base class.
Add nsUrlClassifierRealTimeLookupHandler to manage real-time lookups,
which first checks the global cache then falls back to local list lookup with
hash completion.
Differential Revision: https://phabricator.services.mozilla.com/D279882
This reverts commit 25f0b01591.
Revert "Bug 2010023 - Add telemetry for measuring the real-time traffic. r=dimi"
This reverts commit 3e5168aef5.
Revert "Bug 2010022 - Part 2: Add tests. r=dimi"
This reverts commit 9ab390fdd7.
Revert "Bug 2010022 - Part 1: Introduce the RealTimeRequestSimulator. r=dimi"
This reverts commit 718aba4a26.
Revert "Bug 2010020 - Part 3: Add a test. r=dimi"
This reverts commit 5f58730271.
Revert "Bug 2010020 - Part 2: Implement the real time look up infra. r=dimi"
This reverts commit a110d83e75.
Revert "Bug 2010020 - Part 1: Introduce the UrlClassifierFeatureGlobalCache. r=dimi"
This reverts commit 3ee12f3d0e.
Introduce real-time SafeBrowsing lookup infrastructure. Refactor hash completion
handling by extracting nsUrlClassifierHashCompleterBase as a common base class.
Add nsUrlClassifierRealTimeLookupHandler to manage real-time lookups,
which first checks the global cache then falls back to local list lookup with
hash completion.
Differential Revision: https://phabricator.services.mozilla.com/D279882
This reverts commit e7a7788a00.
Revert "Bug 2010023 - Add telemetry for measuring the real-time traffic. r=dimi"
This reverts commit a9c96eeafe.
Revert "Bug 2010022 - Part 2: Add tests. r=dimi"
This reverts commit 849d25e194.
Revert "Bug 2010022 - Part 1: Introduce the RealTimeRequestSimulator. r=dimi"
This reverts commit ad5e64a055.
Revert "Bug 2010020 - Part 3: Add a test. r=dimi"
This reverts commit 28106bbbec.
Revert "Bug 2010020 - Part 2: Implement the real time look up infra. r=dimi"
This reverts commit d2b89d5a1b.
Revert "Bug 2010020 - Part 1: Introduce the UrlClassifierFeatureGlobalCache. r=dimi"
This reverts commit 178852ef74.
Introduce real-time SafeBrowsing lookup infrastructure. Refactor hash completion
handling by extracting nsUrlClassifierHashCompleterBase as a common base class.
Add nsUrlClassifierRealTimeLookupHandler to manage real-time lookups,
which first checks the global cache then falls back to local list lookup with
hash completion.
Differential Revision: https://phabricator.services.mozilla.com/D279882
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.
In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.
One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.
Most of the heavy lifting was done through:
$ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
$ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'
Differential Revision: https://phabricator.services.mozilla.com/D268706
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.
In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.
One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.
Most of the heavy lifting was done through:
$ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
$ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'
Differential Revision: https://phabricator.services.mozilla.com/D268706
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.
In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.
One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.
Most of the heavy lifting was done through:
$ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
$ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'
Differential Revision: https://phabricator.services.mozilla.com/D268706
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.
In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.
One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.
Most of the heavy lifting was done through:
$ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
$ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'
Differential Revision: https://phabricator.services.mozilla.com/D268706
To improve the startup performance, we delay the CRC32 verfication to
the time before we send the list update to the SafeBrowsing server.
Differential Revision: https://phabricator.services.mozilla.com/D249039
To improve the startup performance, we delay the CRC32 verfication to
the time before we send the list update to the SafeBrowsing server.
Differential Revision: https://phabricator.services.mozilla.com/D249039
This does not reduce the number of threads we end up using in these
cases, but simplifies the complex implementation substantially by
relying on the idle thread lifetime management logic from nsThreadPool.
The nsISerialEventTarget implementation is maintained by wrapping the
nsThreadPool with a TaskQueue.
As a result of using these more reliable backing implementations, the
type is now also safe to use from any thread, rather than requiring
dispatches to all occur from the creator thread.
Unfortunately, this required some changes to the
UntrustedModulesProcessor, which was relying on the ability to fetch the
PRThread* (and from that the HANDLE) from the lazy thread in order to
perform priority changes on it. This was fixed by using a
nsIThreadPoolListener to watch the thread being created and destroyed,
and manually record a HANDLE to the thread which can be used for these
priority changes.
Differential Revision: https://phabricator.services.mozilla.com/D168017
This does not reduce the number of threads we end up using in these
cases, but simplifies the complex implementation substantially by
relying on the idle thread lifetime management logic from nsThreadPool.
The nsISerialEventTarget implementation is maintained by wrapping the
nsThreadPool with a TaskQueue.
As a result of using these more reliable backing implementations, the
type is now also safe to use from any thread, rather than requiring
dispatches to all occur from the creator thread.
Unfortunately, this required some changes to the
UntrustedModulesProcessor, which was relying on the ability to fetch the
PRThread* (and from that the HANDLE) from the lazy thread in order to
perform priority changes on it. This was fixed by using a
nsIThreadPoolListener to watch the thread being created and destroyed,
and manually record a HANDLE to the thread which can be used for these
priority changes.
Differential Revision: https://phabricator.services.mozilla.com/D168017
In Classifier::ReadNoiseEntries(), we used to get the entire prefix set
in order to get noise prefixes. This patch improves it by getting noise
prefixes by index. So, we don't need the entire prefix set.
The patch introduces new functions in LookupCacheV2, V4 and
VariableLengthPrefixSet to allow getting target prefix by index. Also,
we need to inroduces new functions to get the length of the prefix set
to run the noise pick up algorithm.
Differential Revision: https://phabricator.services.mozilla.com/D161771
In Classifier::ReadNoiseEntries(), we used to get the entire prefix set
in order to get noise prefixes. This patch improves it by getting noise
prefixes by index. So, we don't need the entire prefix set.
The patch introduces new functions in LookupCacheV2, V4 and
VariableLengthPrefixSet to allow getting target prefix by index. Also,
we need to inroduces new functions to get the length of the prefix set
to run the noise pick up algorithm.
Differential Revision: https://phabricator.services.mozilla.com/D161771
This patch enables SafeBrowsing in Safe Mode because features based
on SafeBrowsing are essential for Firefox(For example, Enhanced Tracking Protection).
Since Safe Browsing update is nondeterministic, we disable periodical
SafeBrowsing update to make troubleshooting easier. Manually trigger an
update via about:classifier is still enabled.
Last, SafeBrowsing tables provided by Google will be ignored in Safe
Mode to ensure the SafeBrowsing warnings are update-to-date.
Differential Revision: https://phabricator.services.mozilla.com/D62708