Commit Graph

982315 Commits

Author SHA1 Message Date
William Wen
0a4544fe76 Bug 1977066 - Change missed "cm" strings to "cryptoTP". a=diannaS
Original Revision: https://phabricator.services.mozilla.com/D257271

Differential Revision: https://phabricator.services.mozilla.com/D259824
2025-08-05 11:49:17 +00:00
Valentin Gosu
6c1be2988e Bug 1923017 - Fix null ptr deref in CacheFileIOManager::Read a=diannaS
Original Revision: https://phabricator.services.mozilla.com/D253658

Differential Revision: https://phabricator.services.mozilla.com/D259939
2025-08-05 11:40:14 +00:00
Andrew Osmond
442a28af4b Bug 1974174 - Ensure we don't release the fences holder too early. r=sotaro,gfx-reviewers, a=dsmith
This patch adds an additional reference count to each FencesHolder
stored in the map, so that TextureHosts can acquire a reference at
initialization and release it at destruction. Previously the lifetime of
the entry was controlled by the TextureClient + TextureData.

Differential Revision: https://phabricator.services.mozilla.com/D255536
2025-08-05 02:11:32 +00:00
Michael Kaply
c95346b790 Bug 1978092 - Policy should set tracking protection prefs on the default branch when locked. a=diannaS
Differential Revision: https://phabricator.services.mozilla.com/D259446
2025-08-04 23:09:18 +00:00
Michael Kaply
a7b853d0e8 Bug 1973827 - Add policy support for screen permission. a=diannaS
Original Revision: https://phabricator.services.mozilla.com/D255334

Differential Revision: https://phabricator.services.mozilla.com/D259879
2025-08-04 23:03:23 +00:00
ffxbld
9a2c95e1e5 No Bug, mozilla-esr140 repo-update HSTS HPKP remote-settings tld-suffixes ct-logs - a=diannaS
Differential Revision: https://phabricator.services.mozilla.com/D259805
2025-08-04 16:06:06 +00:00
Matthew Gaudet
b8bf3faaee Bug 1970154 - Streams Realm Handling Improvements r=saschanaz,jonco, a=dsmith DONTBUILD
Make TransferArrayBuffer cautious, and remove overzealous assert in JS_GetArrayBufferViewBuffer

Differential Revision: https://phabricator.services.mozilla.com/D253288
2025-08-04 13:01:52 +00:00
Jed Davis
47e3221ff1 Bug 1974445 - Linux sandbox: filter send/recv flags for socket process. a=diannaS
Original Revision: https://phabricator.services.mozilla.com/D255743

Differential Revision: https://phabricator.services.mozilla.com/D259016
2025-07-31 19:32:17 +00:00
Jed Davis
d6f73cfef5 Bug 1974445 - Linux sandbox: filter the flags arguments to send/recv syscalls. a=diannaS
Original Revision: https://phabricator.services.mozilla.com/D255742

Differential Revision: https://phabricator.services.mozilla.com/D259015
2025-07-31 19:32:14 +00:00
Jed Davis
ffbb1e538b Bug 1974445 - Linux sandbox: genericize the socketcall unpack trap. a=diannaS
The sandbox has code to handle `socketcall`, a multiplexer for
socket-related syscalls used in Linux's oldest target architectures, by
unpacking the arguments and resubmitting the call using the individual
syscalls added in kernel 4.3 if available.  This allows seccomp-bpf to
filter the syscall arguments, and not just which call it is (see also
bug 1066750).

Currently this is a special case for `socketpair` and `getsockopt`; this
patch generalizes it and adds a number of other socket calls, which will
be used by the next patch.

Original Revision: https://phabricator.services.mozilla.com/D255741

Differential Revision: https://phabricator.services.mozilla.com/D259014
2025-07-31 19:32:10 +00:00
ffxbld
ba9c3b0b56 No Bug, mozilla-esr140 repo-update HSTS HPKP remote-settings ct-logs - a=diannaS
Differential Revision: https://phabricator.services.mozilla.com/D259454
2025-07-31 18:11:39 +00:00
Thomas Wisniewski
10c77a8f7a Bug 1963764 - make sure Report Broken Site is still hidden appropriately when enterprise DisableFeedbackCommands policy is active (regressed by bug 1952334); r=Gijs, a=dsmith DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D258785
2025-07-31 17:21:57 +00:00
Dana Keeler
05b70c7f11 Bug 1977347 - osclientcerts: check for already being on the right thread in ThreadSpecificHandles::drop a=diannaS
If a `find_objects` implementation encounters an error, it may release a
`ThreadSpecificHandles` on the background thread. Before this patch, this would
cause `ThreadSpecificHandles::drop` to block on the currently-running thread,
causing a deadlock. This patch changes the drop implementation to first check
if it's already on the background thread, in which case it can simply release
the resources without blocking on anything.

Original Revision: https://phabricator.services.mozilla.com/D258085

Differential Revision: https://phabricator.services.mozilla.com/D258729
2025-07-31 15:37:33 +00:00
Jonathan Kew
ec4d6aa373 Bug 1976782 - Guard against possible race via gfxFontEntry::GetFontTable. a=diannaS DONTBUILD
Original Revision: https://phabricator.services.mozilla.com/D258728

Differential Revision: https://phabricator.services.mozilla.com/D259118
2025-07-31 15:13:05 +00:00
Mike Conley
96145a393e Bug 1971702 - Update Opera migrator to account for the Default user profile. a=diannaS
Original Revision: https://phabricator.services.mozilla.com/D254992

Differential Revision: https://phabricator.services.mozilla.com/D259249
2025-07-30 16:56:39 +00:00
Dana Keeler
e85c3d250f Bug 1930690 - certificate transparency: support static-ct-api ("tiled") logs a=diannaS
Differential Revision: https://phabricator.services.mozilla.com/D258972
2025-07-29 20:19:13 +00:00
David P
c68862e175 Bug 1979113: Reject AsyncEncodeAndWriteIcon promise if task dispatch fails on Windows r=daisuke,win-reviewers,gstoll, a=dsmith
Reject the promise at destruction unless it has already been resolved/rejected.
Also return an error (that is ignored).

Differential Revision: https://phabricator.services.mozilla.com/D258614
2025-07-29 18:47:07 +00:00
Emilio Cobos Álvarez
6d1ac1135e Bug 1979163 - Add missing AutoPrepareTraversal. r=firefox-style-system-reviewers,dshin, a=dsmith
Bug 1967507 made the AutoPrepareTraversal scope smaller, but missed this
loop.

Differential Revision: https://phabricator.services.mozilla.com/D258724
2025-07-28 20:10:06 +00:00
James Teh
d06a39a730 Bug 1977166: When moving a RemoteAccessible, ensure it doesn't still have a parent. a=diannaS
Original Revision: https://phabricator.services.mozilla.com/D257206

Differential Revision: https://phabricator.services.mozilla.com/D258841
2025-07-28 19:33:50 +00:00
Pier Angelo Vendrame
448e041655 Bug 1972282 - Check for spoof English in xsl:sort. a=diannaS
Original Revision: https://phabricator.services.mozilla.com/D254784

Differential Revision: https://phabricator.services.mozilla.com/D258855
2025-07-28 19:00:02 +00:00
ffxbld
26ad3887ac No Bug, mozilla-esr140 repo-update HSTS HPKP remote-settings ct-logs - a=diannaS
Differential Revision: https://phabricator.services.mozilla.com/D258885
2025-07-28 11:42:15 +00:00
Kershaw Chang
3797a61e44 Bug 1976376 - More Http2StreamBase cleanup (esr140), r=necko-reviewers,sunil a=diannaS
Differential Revision: https://phabricator.services.mozilla.com/D258683
2025-07-26 21:10:38 +00:00
Lando
9e9cfb0a37 Bug 1978217: apply code formatting via Lando, a=dsmith 2025-07-25 23:32:15 +00:00
Emilio Cobos Álvarez
177b577d2a Bug 1978217 - Add a test for relative URIs inside cacheable inline stylesheets. r=firefox-style-system-reviewers,layout-reviewers,dshin, a=dsmith
This tests both @import and regular declarations. Without this fix, the test
page renders blue, rather than a blue background with a purple square inside
and a smaller lime square inside.

Differential Revision: https://phabricator.services.mozilla.com/D258293
2025-07-25 23:32:12 +00:00
Emilio Cobos Álvarez
41c3fd6f74 Bug 1978217 - Don't share sheets using relative URIs when it's not safe to do so. r=firefox-style-system-reviewers,layout-reviewers,dshin a=dsmith
Track whether an inline sheet might have uris that depend on the base, and
avoid caching them if appropriate.

Differential Revision: https://phabricator.services.mozilla.com/D258292
2025-07-25 23:32:08 +00:00
Emilio Cobos Álvarez
7a19b92511 Bug 1978217 - Add support for custom style use counters. r=firefox-style-system-reviewers,layout-reviewers,dshin, a=dsmith
In the future if we need to we can hook these up to telemetry (in fact it's not
hard, we just need to do that in Document::ReportUseCounters).

For now I want to start using them to record whether we might have a data URI.

Differential Revision: https://phabricator.services.mozilla.com/D258291
2025-07-25 23:32:05 +00:00
Emilio Cobos Álvarez
a3013fe0ae Bug 1978217 - Record use counter data inline in StylesheetContents. r=firefox-style-system-reviewers,layout-reviewers,dshin, a=dsmith
No behavior change, but this is simpler. I want to reuse the use
counters mechanism to fix this bug because it's a very trivial way of
asking questions about the parsed data and we need to plumb it through
the same places.

Differential Revision: https://phabricator.services.mozilla.com/D258290
2025-07-25 23:32:02 +00:00
Eden Chuang
6dbb975108 Bug 1968427 - Adding a null checking on WorkerPrivate::GlobalScope() in ServiceWorkerOpRunnable. a=diannaS
WorkerPrivate's GlobalScope is created during CompileScriptRunnable::WorkerRun.
However, the creation could fail when there is an OOM issue during the WebIDL bindings.
Although the Worker will start the shutdown as soon as possible, there is still a chance that some WorkerRunnable had already been dispatched to the Worker. And there is no guarantee that there is a GlobalScope for the WorkerRunnable.
Unfortunately, WorkerRunnable should check the GlobalScope existence by itself, because not every WorkerRunnable needs the GlobalScope to perform its functionality.

This patch only does the null checking for the ServiceWorkerOpRunnable, since ServiceWorkerOpRunnable are supposed to dispatching an event to the corresponding ServiceWorkerGlobalScope.

Original Revision: https://phabricator.services.mozilla.com/D254659

Differential Revision: https://phabricator.services.mozilla.com/D258725
2025-07-25 19:04:42 +00:00
Greg Stoll
b48f6f4035 Bug 1972786 - show various DLP agent errors for download operations a=diannaS
Show these errors in the download panel, etc.

Original Revision: https://phabricator.services.mozilla.com/D254295

Differential Revision: https://phabricator.services.mozilla.com/D258587
2025-07-24 20:20:47 +00:00
Gijs Kruitbosch
5adc9375da Bug 1973149 - fix form validation message not updating if the form validation popup is already open, a=diannaS
Original Revision: https://phabricator.services.mozilla.com/D254824

Differential Revision: https://phabricator.services.mozilla.com/D258550
2025-07-24 17:53:33 +00:00
Dharma Ong
86d56b6382 Bug 1973763 - Add Aura and DT partner codes to search-config-v2 for android. r=mcheang, a=test-only
Differential Revision: https://phabricator.services.mozilla.com/D257580
2025-07-24 17:44:54 +00:00
ffxbld
03fc0ce6b0 No Bug, mozilla-esr140 repo-update HSTS HPKP remote-settings tld-suffixes ct-logs - a=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D258558
2025-07-24 11:52:32 +00:00
Steve Fink
b29a5e4b56 Bug 1973993 - Switch gdb test to using extra-args a=RyanVM
Original Revision: https://phabricator.services.mozilla.com/D256362

Differential Revision: https://phabricator.services.mozilla.com/D258480
2025-07-24 01:38:06 +00:00
Steve Fink
3594c03511 Bug 1973993 - Switch autospider.py to using mach to run jit-test and jstests a=RyanVM
Original Revision: https://phabricator.services.mozilla.com/D256361

Differential Revision: https://phabricator.services.mozilla.com/D258479
2025-07-24 01:38:03 +00:00
Steve Fink
e3190778ad Bug 1973993 - Install ProfilingCategoryList.h into both the js/ directory and the toplevel include directory a=RyanVM
Original Revision: https://phabricator.services.mozilla.com/D256360

Differential Revision: https://phabricator.services.mozilla.com/D258478
2025-07-24 01:38:01 +00:00
Steve Fink
24a02285cd Bug 1973993 - Add in missing files for running mach a=RyanVM
Original Revision: https://phabricator.services.mozilla.com/D256359

Differential Revision: https://phabricator.services.mozilla.com/D258477
2025-07-24 01:37:58 +00:00
David P
18de707b8e Bug 1551856: Move AudioSession to LayoutStatics r=mccr8,win-reviewers,gstoll a=RyanVM
This allows us to shut down the IAudioSessionManager after Cubeb has stopped,
so there shouldn't be STA apartment deadlock issues with it.
IAudioSessionManager's shutdown always requires the STA.  This patch eliminates
MTA threads involvement at shutdown, which was previously needed for thread
safety.  We keep other operations on MTA (background) threads, for performance.

This also removes a lot of unused functionality.  AudioSession hasn't been
needed outside of the parent process since audio remoting landed.

Differential Revision: https://phabricator.services.mozilla.com/D251773
2025-07-24 01:33:31 +00:00
Greg Stoll
84ee5cc917 Bug 1975175 - cancel Content Analysis when Download is canceled a=diannaS
If a Download is canceled, cancel the Content Analysis request in progress
and return something so the Download can finish.

Original Revision: https://phabricator.services.mozilla.com/D257535

Differential Revision: https://phabricator.services.mozilla.com/D258224
2025-07-23 17:33:59 +00:00
Greg Stoll
863f6fe12f Bug 1973168 - wait for both safebrowsing and content analysis results for downloads a=diannaS
Previously if one result was the most restrictive possible (verdict=VERDICT_DANGEROUS
and shouldBlock=true), we would not wait for the other result and just use that one.
However, safebrowsing results are generally overridable by the user, but a BLOCK result
from content analysis should not be overridable.

Instead of making the early result check more complicated, I think it's more
straightforward to just always wait for both. The existing hasMostRestrictiveResult()
method already knows that content analysis results should take precedence, and I
renamed the parameters to make that more clear.

Original Revision: https://phabricator.services.mozilla.com/D255389

Differential Revision: https://phabricator.services.mozilla.com/D258223
2025-07-23 17:33:57 +00:00
Greg Stoll
416e84a948 Bug 1973043 - if download was blocked on exit, remove it from the downloads list a=diannaS
If the DLP agent responds with WARN for a file, and the user quits Firefox
(after a confirmation dialog), we treat that as a block. Previously we
were just reporting that to the agent and deleting the file on disk. But
for safebrowsing, downloads that were blocked don't persist after a browser
restart, so we should do that too for DLP ones.

So we just delete the download, which includes a call to respond to the
DLP agent and finalize the download, but also removes it from the relevant
lists.

Original Revision: https://phabricator.services.mozilla.com/D255212

Differential Revision: https://phabricator.services.mozilla.com/D258222
2025-07-23 17:33:54 +00:00
Greg Stoll
5a1af9a0bb Bug 1973005 - don't open about:blank when double-clicking on blocked download a=diannaS
I looked into using gInitialPages instead of hard-coding "about:blank",
but:
- there's no convenient window or browser here to access gInitialPages
- We hard-code "about:blank" many other places in source, so its
  "specialness" is already pretty well established.

Original Revision: https://phabricator.services.mozilla.com/D254871

Differential Revision: https://phabricator.services.mozilla.com/D258221
2025-07-23 17:33:51 +00:00
Greg Stoll
19dda29624 Bug 1963385 part 7 - make tests that terminate the DLP agent wait until the process has terminated a=diannaS
This gets rid of some intermittency now that more gtests are terminating
and restarting the agent.

Original Revision: https://phabricator.services.mozilla.com/D252576

Differential Revision: https://phabricator.services.mozilla.com/D258220
2025-07-23 17:33:48 +00:00
Greg Stoll
84a1919b8a Bug 1963385 part 6 - move acknowledgement message after Acknowledge() call a=diannaS
This fixes some intermittency in the gtests, because now we know the
Acknowledge() call has happened when the test receives the
"dlp-acknowledgement-sent-raw" message and no more calls will be made
to the client.

Original Revision: https://phabricator.services.mozilla.com/D252575

Differential Revision: https://phabricator.services.mozilla.com/D258219
2025-07-23 17:33:46 +00:00
Greg Stoll
d17532e2b1 Bug 1963385 part 5 - add response telemetry for Content Analysis a=diannaS
Records the action returned in a response from the DLP agent, as well
as how long the agent took to return a response (roughly). Note that if
the agent pops up some kind of its own WARN dialog, the timing recorded
will include how long it took for the user to pick an option, so this
may not end up being too valuable.

Also includes a bit more shuffling around of test code so the telemetry
tests can use it.

Original Revision: https://phabricator.services.mozilla.com/D252574

Differential Revision: https://phabricator.services.mozilla.com/D258218
2025-07-23 17:33:43 +00:00
Greg Stoll
553655971b Bug 1963385 part 4 - refactor telemetry tests to avoid starting agent so much a=diannaS
Instead of having each telemetry test start the agent at the top, add
helper methods EnsureAgentStarted() and EnsureAgentTerminated() that
will sure the agent is running or not, and will no-op if it's already in
that state.

Original Revision: https://phabricator.services.mozilla.com/D252573

Differential Revision: https://phabricator.services.mozilla.com/D258217
2025-07-23 17:33:40 +00:00
Greg Stoll
3a7d45faba Bug 1963385 part 3 - add requests telemetry for Content Analysis a=diannaS
Records requests made (specifically the analysisType and reason), and
also requests allowed/blocked by the allow/deny URL lists.

Original Revision: https://phabricator.services.mozilla.com/D252572

Differential Revision: https://phabricator.services.mozilla.com/D258216
2025-07-23 17:33:37 +00:00
Greg Stoll
fdd82d20b2 Bug 1963385 part 2 - add connection attempts/failures telemetry for Content Analysis a=diannaS
Records connection attempts, retries, and failures (with nsresult).

This also adds a GetCreatingClientForTest() method so that tests can
call to create a client, then SpinEventLoopUntil() until
GetCreatingClientForTest() returns false, and after this point the
telemetry should be recorded.

Also moves some test code from TestContentAnalysis.cpp to
TestContentAnalysisUtils.h so it can be used in the new telemetry gtests.

Note that these new gtests start the agent every time it's needed - this
will be cleaned up in part 4.

Original Revision: https://phabricator.services.mozilla.com/D252571

Differential Revision: https://phabricator.services.mozilla.com/D258215
2025-07-23 17:33:35 +00:00
Greg Stoll
0acca0e06b Bug 1963385 part 1 - add settings telemetry for Content Analysis a=diannaS
Records telemetry for the settings used with Content Analysis. Note
that there is no way in C++ to get the default value of a pref that was
set via an Enterprise Policy (with setAndLockPref()) because that method
actually sets the default value, so I had to modify some of my plans for
telemetry to gather. For example, I was going to record interception points
whose Enabled value differed from the default, but instead we record
any interception points whose Enabled value is false. (right now these
are equivalent, but Downloads will be default-off so this will change)

For the allow/deny URL lists I didn't want to record the actual URLs
on those lists, so we really do want to just record whether the values
are different from the default. I hard-coded the default into
ContentAnalysis.cpp, and we can rely on the JS test
test_ca_enterprise_config_with_default_prefs_telemetry() to start failing
if that changes.

Also adds a forceRecreateClientForTest() method to ContentAnalysis that
tests can use to force trying to connect to a client. (since this is when
we record the settings telemetry)

Original Revision: https://phabricator.services.mozilla.com/D252570

Differential Revision: https://phabricator.services.mozilla.com/D258214
2025-07-23 17:33:32 +00:00
Greg Stoll
972e0fdf7c Bug 1972773 - avoid showing "confirm quit" dialog in Content Analysis if we have already cancelled quit a=diannaS
I think there may be some other corner cases (if the user decides to confirm
the quit with a download running we still still show a dialog here), but
that is harder to fix and this is a start.

Original Revision: https://phabricator.services.mozilla.com/D254291

Differential Revision: https://phabricator.services.mozilla.com/D258213
2025-07-23 17:33:29 +00:00
Greg Stoll
0c73a36334 Bug 1972764 - Lint Fix a=diannaS
Original Revision: https://phabricator.services.mozilla.com/D254296

Differential Revision: https://phabricator.services.mozilla.com/D258212
2025-07-23 17:33:26 +00:00