If the user has a non-default regular cookieBehavior, we will make the
private cookieBehavior getter to return the regular pref to mirror the
cookieBehavior in ETP custom mode.
In addition, we don't need to do the pref migration because if the user
has a non-default cookieBehavior, it will directly mirror to the private
cookieBehavior pref so that the cookieBehavior is consistent for private
mode.
Differential Revision: https://phabricator.services.mozilla.com/D111002
Add HttpChannelCompletion, which is just the completion time for any request.
This allows us to measure overall improvements, instead of shifting requests from cache to network via RCWN.
Differential Revision: https://phabricator.services.mozilla.com/D111335
Unix socket names have a fairly short maximum length. Turns out that on Python
3 'mkdtemp' creates directories that have two extra characters as opposed to
Python 2. That was enough for us to hit the max length and break this test.
Work around the issue by using a shorter base name for the socket (which doesn't
make a difference to the test).
Depends on D109730
Differential Revision: https://phabricator.services.mozilla.com/D111647
moz-extension:-URLs cannot be loaded by default, unless an extension
explicitly lists the resource in web_accessible_resources. At that
point, a URL is considered world-readable, and the load should succeed
regardless of the requested CORS mode in the fetch/request.
Differential Revision: https://phabricator.services.mozilla.com/D111016
For webcompat reasons, we have determined that we should only limit the length
of URIs in specific cases. We're going to handle this on the GV side instead.
Differential Revision: https://phabricator.services.mozilla.com/D109426
We only need to react to a completed captive portal check when the captive
portal was previously locked. When not in a captive portal, this notification
only means the check has completed - no network properties have changed.
Differential Revision: https://phabricator.services.mozilla.com/D109723
A TRR request is created and dispatched to the handling thread.
If we want to cancel it, we may do so before the runnable has been handled
and there's no HTTP channel - so the cancel was a NO-OP.
Here we add mCancelled which is consulted in SendHTTPRequest to check
if the request has already been cancelled.
Differential Revision: https://phabricator.services.mozilla.com/D109590
This patch consists of the changes generated by running
`./mach static-analysis check --fix` on `netwerk/dns` after adding the
`modernize-use-default-member-init` clang-tidy lint.
Some additional changes were made by hand to ensure consistent results.
This patch ensures that all member variables are initialized in the header,
so when adding or changing constructors we don't miss one resulting in
uninitialized memory.
Differential Revision: https://phabricator.services.mozilla.com/D109339
The reason this worked previously is that we initialized `recPtr = rec;` in
the for loop iterating through callbacks.
Records that were in the evictionQ did not have any callbacks, so we never
entered this block.
Differential Revision: https://phabricator.services.mozilla.com/D109338
When mTargetThread is WebSocketImpl it must be released on main since it
implements nsISupportsWeakReference, and clearing weak references is not
threadsafe.
Differential Revision: https://phabricator.services.mozilla.com/D109783
This adds support for nsIDelayedRunnableObserver to nsStreamTransportService.
This is a bit special because nsStreamTransportService uses an nsThreadPool.
Because of race conditions we cannot dispatch a final cleanup task to cancel any
pending DelayedRunnables.
Because of the inherent raciness of threads in the thread pool we assume that
any pending DelayedRunnables can handle being released on any thread. Thus we
dispatch the cleanup task to the background event target once the thread pool
has been shut down and processed all its events. This ensures no races can occur
between the cleanup task and OnDelayedRunnableScheduled.
Differential Revision: https://phabricator.services.mozilla.com/D109782
This change constitutes a way we can redirect users to an actual page that
explains what captive portals are and why we are making these requests.
Normally users should not see this page, as we only compare the contents
of a small html file. The meta redirect only happens when loaded in a
page.
The SUMO URL https://support.mozilla.org/kb/captive-portal will automatically
redirect to the appropriate locale.
Differential Revision: https://phabricator.services.mozilla.com/D99773
We only need to react to a completed captive portal check when the captive
portal was previously locked. When not in a captive portal, this notification
only means the check has completed - no network properties have changed.
Differential Revision: https://phabricator.services.mozilla.com/D109723
A TRR request is created and dispatched to the handling thread.
If we want to cancel it, we may do so before the runnable has been handled
and there's no HTTP channel - so the cancel was a NO-OP.
Here we add mCancelled which is consulted in SendHTTPRequest to check
if the request has already been cancelled.
Differential Revision: https://phabricator.services.mozilla.com/D109590
This patch consists of the changes generated by running
`./mach static-analysis check --fix` on `netwerk/dns` after adding the
`modernize-use-default-member-init` clang-tidy lint.
Some additional changes were made by hand to ensure consistent results.
This patch ensures that all member variables are initialized in the header,
so when adding or changing constructors we don't miss one resulting in
uninitialized memory.
Differential Revision: https://phabricator.services.mozilla.com/D109339
The reason this worked previously is that we initialized `recPtr = rec;` in
the for loop iterating through callbacks.
Records that were in the evictionQ did not have any callbacks, so we never
entered this block.
Differential Revision: https://phabricator.services.mozilla.com/D109338
When mTargetThread is WebSocketImpl it must be released on main since it
implements nsISupportsWeakReference, and clearing weak references is not
threadsafe.
Differential Revision: https://phabricator.services.mozilla.com/D109783
This adds support for nsIDelayedRunnableObserver to nsStreamTransportService.
This is a bit special because nsStreamTransportService uses an nsThreadPool.
Because of race conditions we cannot dispatch a final cleanup task to cancel any
pending DelayedRunnables.
Because of the inherent raciness of threads in the thread pool we assume that
any pending DelayedRunnables can handle being released on any thread. Thus we
dispatch the cleanup task to the background event target once the thread pool
has been shut down and processed all its events. This ensures no races can occur
between the cleanup task and OnDelayedRunnableScheduled.
Differential Revision: https://phabricator.services.mozilla.com/D109782
- Rename nsAciiMask.h details:: namespace to asciimask_details so it doesn't clash with ipc/chromium/src/base/task.h
- Add SetSpecAndFilterWhitespace simple URI constructor that filters whitespace instead of just CR/LF.
- Only do one scan of the string in nsSimpleURI::SetPathQueryRefInternal in order to find the end of the path, query & ref.
There are probably more optimizations possible.
In my testing these get me a 1.5x-2x speedup.
Differential Revision: https://phabricator.services.mozilla.com/D107567
This may happen when a TransportSetup retry to connect using a different IP address, but AsyncResolveNative failed.
The change adds a flag that indicates whether it is needed to remove a connection from mNumActiveConns. This should make sure that we do not do it multiple times.
Differential Revision: https://phabricator.services.mozilla.com/D110723
This is usually the case for HTTP/3 mapping.
The messages are useful only if a request is routed to a different domain name.
Differential Revision: https://phabricator.services.mozilla.com/D109978
This patch adds a method `initwithURI` to nsICookieJarSetting in order
to allow JS code to be able to set the paritionKey of the
CookieJarSettings.
This is needed for web extension for creating and setting the
cookieJarSettings for the download resource.
Differential Revision: https://phabricator.services.mozilla.com/D109759
After applying D102448,
uriloader/exthandler/tests/mochitest/test_nullCharFile.xhtml starts to fail.
The reason is that it adds image sniffer into net-content-sniffers which is not
expected.
Such that, this patch
- adds two other sniffers category:
- orb-content-sniffers
- The sniffers that are needed in ORB.
- net-and-orb-content-sniffers
- The sniffers that are in either orb-content-sniffers or net-content-sniffers.
- changes the way to ensure we only use the sniffers in the
requested category.
Differential Revision: https://phabricator.services.mozilla.com/D107207
This patch updates the call-sites of CookieJarSettings::Create() in both
LoadInfo.cpp, nsHttpChannel.cpp and CookieCommons.cpp.
Differential Revision: https://phabricator.services.mozilla.com/D109048
This patch updates the pref for existing content blocking tests. And it
also adds a new test to verify that the cookieBehavior in regular
windowa and private window are both correct.
Differential Revision: https://phabricator.services.mozilla.com/D109046
This patch modifies the current CookieJarSettings::Create() function.
It removes the current function and adds two variants. One takes the
nsIPrincipal as input and another takes the enum value. The new
functions will test if the input is for the private browsing window to
create the corresponding cookieJarSettings.
Differential Revision: https://phabricator.services.mozilla.com/D109045