Commit Graph

1029 Commits

Author SHA1 Message Date
Florian Quèze
7d7cb7f391 Bug 1913624 - Remove expired telemetry histogram NETWORK_CONNECTION_COUNT, r=TravisLong.
Differential Revision: https://phabricator.services.mozilla.com/D219454
2024-08-23 16:27:17 +00:00
Peter Van der Beken
839abe8af7 Bug 1900930 - Add WouldReportJSException() calls. r=dom-core,farre,necko-reviewers,kershaw
TypedArray::Create will put exceptions on the ErrorResult, so signal that we're
dealing with them in various callsites.

Differential Revision: https://phabricator.services.mozilla.com/D214794
2024-08-21 08:43:09 +00:00
Stanca Serban
11cd73d7a7 Backed out 6 changesets (bug 1900930) for causing xpcshell assertion failures in ErrorResult.h. CLOSED TREE
Backed out changeset 5234a13894b2 (bug 1900930)
Backed out changeset 638842494167 (bug 1900930)
Backed out changeset 36695bae43ed (bug 1900930)
Backed out changeset 23ab72aa4589 (bug 1900930)
Backed out changeset c89109c12d59 (bug 1900930)
Backed out changeset 2d3f52edb98a (bug 1900930)
2024-07-25 13:53:53 +03:00
Peter Van der Beken
bfe8e50a07 Bug 1900930 - Add WouldReportJSException() calls. r=dom-core,farre
TypedArray::Create will put exceptions on the ErrorResult, so signal that we're
dealing with them in various callsites.

Differential Revision: https://phabricator.services.mozilla.com/D214794
2024-07-25 07:40:41 +00:00
Otto Länd
15ebf0e957 Bug 1904442: apply code formatting via Lando
# ignore-this-changeset
2024-07-01 11:52:48 +00:00
Emilio Cobos Álvarez
4ffa6418bb Bug 1904442 - Rename GlobalTeardownObserver::GetOwner to GetOwnerWindow. r=smaug,media-playback-reviewers,dom-storage-reviewers,aosmond,padenot,asuth
Also HasOrHasHadOwner to HasOrHasHadOwnerWindow.

Differential Revision: https://phabricator.services.mozilla.com/D214772
2024-07-01 11:49:59 +00:00
Eden Chuang
da208da98f Bug 1894231 - P3 Remove WorkerPrivate* in WorkerMainThreadRunnable. r=dom-worker-reviewers,extension-reviewers,smaug,rpl
Remove mWorkerPrivate from WorkerMainThreadRunnable. Instead, using a ThreadSafeWorkerRef to keep Worker alive until the created syncLoop is destroyed.

In general, WorkerMainThreadRunnable::mWorkerPrivate is only used for dispatching the MainThreadStopSyncLoopRunnable back to the Worker thread. Because of the syncLoop, the Worker is supposed to be kept alive until the created syncLoop is destroyed.

RefPtr<ThreadSafeWorkerRef> WorkerMainThreadRunnable::mWorkerRef is introduced to ensure a valid WorkerPrivate during WorkerMainThreadRunnable's execution.

WorkerMainThreadRunnable::mWorkerRef is allocated just before creating a syncLoop in WorkerMainThreadRunnable::Dispatch. And released after the created syncLoop::Run() finishes.

Depends on D212556

Differential Revision: https://phabricator.services.mozilla.com/D212557
2024-06-24 22:20:51 +00:00
Nika Layzell
b3f3e9a04a Bug 1892481 - More consistently enforce noscript and builtinclass in xpidl, r=xpcom-reviewers,necko-reviewers,valentin,media-playback-reviewers,mccr8,padenot
These properties were previously being checked much later, during xptcodegen,
and causing methods to be treated as noscript implicitly.

This change enforces the noscript requirements earlier when possible in
xpidl.py, to produce better errors, and adds addiitonal checks to ensure that
types which need to be builtinclass are marked as such.

This required some changes to interfaces in order to satisfy the new checks.

Differential Revision: https://phabricator.services.mozilla.com/D207804
2024-04-22 18:19:58 +00:00
Eden Chuang
2f65cf28ae Bug 1769913 - P3 Remove WorkerRunnable::mWorkerPrivate. r=dom-worker-reviewers,asuth
WorkerRunnable no longer keeps a raw pointer(mWorkerPrivate) for the associated WorkerPrivate in this patch.
Removing the WorkerRunnable::mWorkerPrivate needs to fix the following problems.

1. Thread assertions in WorkerRunnable::Dispatch()

To fix this problem, the associated WorkerPrivate is as a parameter and passed to WorkerRunnable::Dispatch() for the dispatching thread assertions. This associated WorkerPrivate is also propagated to PreDispatch() and PostDispatch() for the children classes of WorkerRunnable()

2. Get the associated WorkerPrivate in WorkerRunnable::Run() for environment setup(GlobabObject, JSContext setting for the runnable)

- For WorkerThreadRunnable

Since WorkerThreadRunnable is supposed to run on the worker thread, it does not need to keep a raw pointer to WorkerPrivate as its class member. GetCurrentThreadWorkerPrivate() should always get the correct WorkerPrivate for WorkerThreadRunnable.

- For WorkerParentThreadRunnable

WorkerParentRef is introduced to keep a RefPtr<WorkerPrivate> for WorkerParentThreadRunnable instead of using a raw pointer.
Checking the associated WorkerPrivate existence by WorkerParentRef at the beginning of WorkerParentThreadRunnable::Run(). If the Worker has already shut down, WorkerParentThreadRunnable cannot do anything with the associated WorkerPrivate, so WorkerParentThreadRunnable::Run() will return NS_OK directly but with a warning.

The associated WorkerPrivate is also passed into WorkerRun(), PreRun(), and PostRun(), so the majority of implementations of child classes of WorkerRunnable do not need to be changed.

If there are any cases in which the child classes of WorkerThreadRunnable/WorkerParentThreadRunnable want to keep the associated WorkerPrivate, they should use WorkerRefs instead of raw pointers.

Depends on D205679

Differential Revision: https://phabricator.services.mozilla.com/D207039
2024-04-19 09:41:58 +00:00
Eden Chuang
e22d6ca385 Bug 1769913 - P1 Make WorkerRunnable to be a base class for runnables on Worker thread and Worker's parent thread. r=dom-worker-reviewers,asuth
This is the first step in splitting the parent thread runnable out of WorkerRunnable.

To reuse the runnable dispatching codes in Worker, we still need a base class for runnable on the worker thread and the parent thread.

In this patch, we rename the original WorkerRunnable to WorkerThreadRunnable and make WorkerRunnable to be WorkerThreadRunnable's parent class.

In the second patch, we will create WorkerParentThreadRunnable and its sub-classes, split from WorkerThreadRunnable for runnable on the Worker's parent thread.

And in the third patch, we will re-structure the content of WorkerParentThreadRunnable to remove unnecessary members.

Differential Revision: https://phabricator.services.mozilla.com/D205178
2024-04-19 09:41:57 +00:00
unknown
c2f36e9b38 Bug 1885246 - Replace PlainOldDataSerializer with ParamTraits_TiedFields, except for gfx/vr and gfx/layers/wr. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D204567
2024-03-23 01:06:45 +00:00
Cristian Tuns
ddbddee3ca Backed out changeset ebc075fd132d (bug 1885246) for causing bc failures in /EnumSerializer.h CLOSED TREE 2024-03-23 02:08:24 -04:00
unknown
941fa870d7 Bug 1885246 - Replace PlainOldDataSerializer with ParamTraits_TiedFields, except for gfx/vr and gfx/layers/wr. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D204567
2024-03-23 01:06:45 +00:00
Iulian Moraru
2099cdafe7 Backed out changeset 1e8b7f3addc7 (bug 1885246) for causing non-unified build bustages on TCPSocket.cpp. CLOSED TREE 2024-03-21 17:53:50 +02:00
unknown
0bb02f8f0f Bug 1885246 - Replace PlainOldDataSerializer with ParamTraits_TiedFields, except for gfx/vr and gfx/layers/wr. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D204567
2024-03-21 14:04:04 +00:00
Narcis Beleuzu
4c5db927ba Backed out changeset 98564ffc07ca (bug 1885246) for bustages on WebGLIpdl.h 2024-03-20 04:26:20 +02:00
unknown
44a0c5fe34 Bug 1885246 - Replace PlainOldDataSerializer with ParamTraits_TiedFields, except for gfx/vr and gfx/layers/wr. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D204567
2024-03-20 01:56:09 +00:00
Dave Townsend
6a99b2e0d4 Bug 1864896: Autofix unused function arguments (dom). r=emilio,media-playback-reviewers,dom-storage-reviewers,padenot,janv
Differential Revision: https://phabricator.services.mozilla.com/D202962
2024-03-04 15:44:59 +00:00
Jens Stutte
a2709c2f0e Bug 1875800 - Add name support to WorkerRunnable. r=dom-worker-reviewers,asuth,smaug
Differential Revision: https://phabricator.services.mozilla.com/D199228
2024-01-24 16:00:26 +00:00
Cristian Tuns
741982b984 Backed out changeset f3efca74da0f (bug 1875800) for causing build bustages in WorkerPrivate.cpp CLOSED TREE 2024-01-23 11:20:38 -05:00
Jens Stutte
2594dc03cd Bug 1875800 - Add name support to WorkerRunnable. r=dom-worker-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D199228
2024-01-23 11:23:41 +00:00
Kershaw Chang
8e045b102b Bug 1852924 - When pacer returns a small delay, pretend to wait and get the next packet to send, r=mt
Differential Revision: https://phabricator.services.mozilla.com/D191325
2023-11-21 11:49:49 +00:00
Peter Van der Beken
44a577eec3 Bug 1849037 - Add ErrorResult to TypedArray::Create. r=necko-reviewers,extension-reviewers,media-playback-reviewers,webidl,profiler-reviewers,farre,padenot,smaug,robwu,jesup,aabh
Differential Revision: https://phabricator.services.mozilla.com/D191418
2023-11-11 08:24:05 +00:00
Peter Van der Beken
29a54c8a17 Bug 1849037 - Pass objects that support conversion to a Span directly to TypedArray::Create as a Span. r=necko-reviewers,extension-reviewers,media-playback-reviewers,profiler-reviewers,farre,padenot,jesup
Differential Revision: https://phabricator.services.mozilla.com/D191416
2023-11-11 08:24:04 +00:00
Noemi Erli
e4935542bd Backed out changeset 75ebf5892d17 (bug 1852924) for frequent fail rate in Bug 1751116 2023-11-09 12:24:35 +02:00
Stanca Serban
2685d35c49 Backed out 3 changesets (bug 1849037) for causing mochitests failures in test_gamepad_extensions.html.
Backed out changeset 27fd9f6f57ea (bug 1849037)
Backed out changeset 89aa49de2473 (bug 1849037)
Backed out changeset c336a8c78928 (bug 1849037)
2023-11-08 17:12:40 +02:00
Peter Van der Beken
2b267480e6 Bug 1849037 - Add ErrorResult to TypedArray::Create. r=necko-reviewers,extension-reviewers,media-playback-reviewers,webidl,profiler-reviewers,farre,padenot,smaug,robwu,jesup
Differential Revision: https://phabricator.services.mozilla.com/D191418
2023-11-08 11:29:05 +00:00
Peter Van der Beken
7cb765ad2c Bug 1849037 - Pass objects that support conversion to a Span directly to TypedArray::Create as a Span. r=necko-reviewers,extension-reviewers,media-playback-reviewers,profiler-reviewers,farre,padenot,jesup
Differential Revision: https://phabricator.services.mozilla.com/D191416
2023-11-08 11:29:04 +00:00
Kershaw Chang
080eb71b98 Bug 1852924 - When pacer returns a small delay, pretend to wait and get the next packet to send, r=mt
Differential Revision: https://phabricator.services.mozilla.com/D191325
2023-11-08 10:11:22 +00:00
Cristina Horotan
78baad5002 Backed out changeset f5d7c3a00f2b (bug 1852924) for causing dt failures at mod.rs on a CLOSED TREE 2023-11-06 19:11:56 +02:00
Kershaw Chang
1ad4a1b577 Bug 1852924 - When pacer returns a small delay, pretend to wait and get the next packet to send, r=mt
Differential Revision: https://phabricator.services.mozilla.com/D191325
2023-11-06 11:51:39 +00:00
Emilio Cobos Álvarez
25c0d10932 Bug 1624819 - Remove TaskCategory and other quantum dom remnants. r=smaug,media-playback-reviewers,credential-management-reviewers,cookie-reviewers,places-reviewers,win-reviewers,valentin,mhowell,sgalich,alwu
Sorry this is not a particularly easy patch to review. But it should be
mostly straight-forward.

I kept Document::Dispatch mostly for convenience, but could be
cleaned-up too / changed by SchedulerGroup::Dispatch. Similarly maybe
that can just be NS_DispatchToMainThread if we add an NS_IsMainThread
check there or something (to preserve shutdown semantics).

Differential Revision: https://phabricator.services.mozilla.com/D190450
2023-10-10 08:51:12 +00:00
Emilio Cobos Álvarez
50daad8922 Bug 1817122 - Make AsyncEventDispatcher(Event) take ownership of the event. r=smaug,media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D190059
2023-10-04 19:37:39 +00:00
Tom Marble
faa34b0552 Bug 1855296 - convert .ini manifests to .toml: batch 9 dom/[m-s]**/mochitest.ini r=jmaher,media-playback-reviewers,alwu
Differential Revision: https://phabricator.services.mozilla.com/D189845
2023-10-03 19:35:22 +00:00
Peter Van der Beken
c49b5c3f78 Bug 1690111 - Use new TypedArray APIs for creating a container with a copy of the data. r=necko-reviewers,farre,kershaw
Depends on D152496

Differential Revision: https://phabricator.services.mozilla.com/D152497
2023-09-20 09:42:02 +00:00
Peter Van der Beken
cdd05c282d Bug 1690111 - Use new TypedArray APIs for appending data to a container. r=farre,extension-reviewers,media-playback-reviewers,kmag,alwu,padenot
Depends on D152494

Differential Revision: https://phabricator.services.mozilla.com/D152495
2023-09-20 09:42:01 +00:00
Tom Marble
9e40a719f2 Bug 1850545 - convert .ini manifests to .toml: batch 3 chrome.ini (bis) r=jmaher,geckoview-reviewers,extension-reviewers,credential-management-reviewers,devtools-reviewers,fxview-reviewers,places-reviewers,profiler-reviewers,m_kato,mak,mtigley
Differential Revision: https://phabricator.services.mozilla.com/D187597
2023-09-13 18:28:32 +00:00
Cosmin Sabou
680b4364c7 Backed out 13 changesets (bug 1690111) for causing fetch related crashes.
Backed out changeset 5f2c25d194ad (bug 1690111)
Backed out changeset 76c408bcd053 (bug 1690111)
Backed out changeset 6d0649fdafff (bug 1690111)
Backed out changeset c1330b5e8c43 (bug 1690111)
Backed out changeset 5fa36d8fd2a5 (bug 1690111)
Backed out changeset daf7d747853a (bug 1690111)
Backed out changeset f70e09a7f5c6 (bug 1690111)
Backed out changeset 40c6d6eed7f8 (bug 1690111)
Backed out changeset 692f2a759573 (bug 1690111)
Backed out changeset 7140866dd9f6 (bug 1690111)
Backed out changeset 2865fe682139 (bug 1690111)
Backed out changeset 9dcd2416f8a5 (bug 1690111)
Backed out changeset 9c411bf84079 (bug 1690111)
2023-09-11 17:55:24 +03:00
Peter Van der Beken
176d24acb3 Bug 1690111 - Use new TypedArray APIs for creating a container with a copy of the data. r=necko-reviewers,farre,kershaw
Depends on D152496

Differential Revision: https://phabricator.services.mozilla.com/D152497
2023-09-11 12:52:20 +00:00
Peter Van der Beken
39cc003472 Bug 1690111 - Use new TypedArray APIs for appending data to a container. r=farre,extension-reviewers,media-playback-reviewers,kmag,alwu,padenot
Depends on D152494

Differential Revision: https://phabricator.services.mozilla.com/D152495
2023-09-11 12:52:20 +00:00
Mark Banner
0b2d2afdea Bug 1837176 - Convert imports of httpd.js to consume the ES module directly. r=necko-reviewers,webcompat-reviewers,extension-reviewers,settings-reviewers,application-update-reviewers,credential-management-reviewers,devtools-reviewers,cookie-reviewers,twisniewski,robwu,issammani,bytesized,pbz,valentin
Differential Revision: https://phabricator.services.mozilla.com/D181159
2023-07-12 13:38:34 +00:00
André Bargull
4b2a32ee5c Bug 1841314 - Part 7: Add char and uint8_t overloads for NewArrayBufferWithContents. r=sfink
Depends on D182644

Differential Revision: https://phabricator.services.mozilla.com/D182645
2023-07-06 20:51:00 +00:00
André Bargull
50d9348a9e Bug 1841314 - Part 3: Prefer JS::NewArrayBufferWithContents with UniquePtr. r=sfink,saschanaz
Replace the existing callers of `JS::NewArrayBufferWithContents` with the new
`UniquePtr` alternative.

Three callers to the old `JS::NewArrayBufferWithContents` function were left
unchanged:
- `mozilla::dom::FileReader::OnLoadEndArrayBuffer()` and
  `mozilla::dom::ArrayBufferBuilder::TakeArrayBuffer()` both store the data
  buffer as members and therefore have a more complicated lifetime.
- `JSStructuredCloneReader::readTransferMap()` because it's not clear if the
  data can be free'ed when `ArrayBuffectObject` allocation fails.

Differential Revision: https://phabricator.services.mozilla.com/D182588
2023-07-06 20:50:59 +00:00
Sandor Molnar
a6c121377b Backed out 7 changesets (bug 1841314) for causing hazard failures. CLOSED TREE
Backed out changeset 82a53d6ea95a (bug 1841314)
Backed out changeset 524607b471a2 (bug 1841314)
Backed out changeset ce128e10bddb (bug 1841314)
Backed out changeset cdae4fbbdaff (bug 1841314)
Backed out changeset f1035b6c08fe (bug 1841314)
Backed out changeset 5897ad8ef181 (bug 1841314)
Backed out changeset 09618a767080 (bug 1841314)
2023-07-06 16:59:47 +03:00
André Bargull
abb485223a Bug 1841314 - Part 7: Add char and uint8_t overloads for NewArrayBufferWithContents. r=sfink
Depends on D182644

Differential Revision: https://phabricator.services.mozilla.com/D182645
2023-07-06 12:26:54 +00:00
André Bargull
412b9d7c45 Bug 1841314 - Part 3: Prefer JS::NewArrayBufferWithContents with UniquePtr. r=sfink,saschanaz
Replace the existing callers of `JS::NewArrayBufferWithContents` with the new
`UniquePtr` alternative.

Three callers to the old `JS::NewArrayBufferWithContents` function were left
unchanged:
- `mozilla::dom::FileReader::OnLoadEndArrayBuffer()` and
  `mozilla::dom::ArrayBufferBuilder::TakeArrayBuffer()` both store the data
  buffer as members and therefore have a more complicated lifetime.
- `JSStructuredCloneReader::readTransferMap()` because it's not clear if the
  data can be free'ed when `ArrayBuffectObject` allocation fails.

Differential Revision: https://phabricator.services.mozilla.com/D182588
2023-07-06 12:26:53 +00:00
Cristina Horotan
f77c6f3e48 Backed out 7 changesets (bug 1841314) for causing hazard failures at js.cpp CLOSED TREE
Backed out changeset becc2fa2c186 (bug 1841314)
Backed out changeset e5b723317177 (bug 1841314)
Backed out changeset 61ae850b25e5 (bug 1841314)
Backed out changeset 9ff320c779b8 (bug 1841314)
Backed out changeset debf1172f794 (bug 1841314)
Backed out changeset 8ac4fa317006 (bug 1841314)
Backed out changeset eccacbb3b620 (bug 1841314)
2023-07-06 15:11:47 +03:00
André Bargull
664cf60824 Bug 1841314 - Part 7: Add char and uint8_t overloads for NewArrayBufferWithContents. r=sfink
Depends on D182644

Differential Revision: https://phabricator.services.mozilla.com/D182645
2023-07-06 11:41:18 +00:00
André Bargull
0c386d5c4b Bug 1841314 - Part 3: Prefer JS::NewArrayBufferWithContents with UniquePtr. r=sfink,saschanaz
Replace the existing callers of `JS::NewArrayBufferWithContents` with the new
`UniquePtr` alternative.

Three callers to the old `JS::NewArrayBufferWithContents` function were left
unchanged:
- `mozilla::dom::FileReader::OnLoadEndArrayBuffer()` and
  `mozilla::dom::ArrayBufferBuilder::TakeArrayBuffer()` both store the data
  buffer as members and therefore have a more complicated lifetime.
- `JSStructuredCloneReader::readTransferMap()` because it's not clear if the
  data can be free'ed when `ArrayBuffectObject` allocation fails.

Differential Revision: https://phabricator.services.mozilla.com/D182588
2023-07-06 11:41:17 +00:00
Tom Schuster
d25d725db1 Bug 1838415 - Introduce RFPTarget::NavigatorConnection. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D181202
2023-06-21 07:01:23 +00:00