Граф коммитов

689 Коммитов

Автор SHA1 Сообщение Дата
Peter Van der Beken 0063c225d9 Bug 1900930 - Make nsProfiler use TypedArrayCreator. r=dom-core,profiler-reviewers,farre,canaltinova
Using TypedArrayCreator avoids use of ErrorResult completely (and the need to
call MightThrowJSException/WouldReportJSException).

Differential Revision: https://phabricator.services.mozilla.com/D214793
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 bc82f920a6 Bug 1900930 - Make nsProfiler use TypedArrayCreator. r=dom-core,profiler-reviewers,farre,canaltinova
Using TypedArrayCreator avoids use of ErrorResult completely (and the need to
call MightThrowJSException/WouldReportJSException).

Differential Revision: https://phabricator.services.mozilla.com/D214793
2024-07-25 07:40:40 +00:00
Jon Coppeard 5e6632a42b Bug 1896973 - Part 1: Tidy some JS::Heap methods r=sfink
This renames address() and unsafeGet() methods to be const and non-const
versions of unsafeAddress.

The unnecessary operator bool() overload is removed.

Differential Revision: https://phabricator.services.mozilla.com/D212260
2024-06-13 07:33:54 +00:00
Ray Kraesig e2ee2f11df Bug 1891541 - [2/2] enforce that MozPromise only accepts static strings r=xpcom-reviewers,media-playback-reviewers,padenot,emilio
All present uses of the call-site arguments to MozPromise's methods
supply static strings. However, this is nowhere enforced. Do so.

Additionally, since this is the third or fourth time the present author
alone has personally implemented such an enforcement mechanism, create a
helper class to simplify doing so.

No functional changes.

Differential Revision: https://phabricator.services.mozilla.com/D207462
2024-04-24 17:02:49 +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
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
Mark Banner fa86f5170e Bug 1881265 - Enable ESLint recommended rule getter-return. r=mossop,extension-reviewers,devtools-reviewers,omc-reviewers,nchevobbe,aminomancer,robwu
Differential Revision: https://phabricator.services.mozilla.com/D202318
2024-02-26 11:35:40 +00:00
Gregory Pappas 8a346c5258 Bug 1607905 - Remove dom::Promise::Then r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D202045
2024-02-19 20:53:49 +00:00
Eden Chuang 5c699915b9 Bug 1873573 - Rename PromiseWorkerProxy::WorkerPromise() to GetWorkerPromise(). r=dom-worker-reviewers,smaug
Differential Revision: https://phabricator.services.mozilla.com/D199323
2024-01-26 10:48:56 +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
Joel Maher 28be3ac6b4 Bug 1859890 - batch 14 convert xpcshell.ini -> .toml. r=aryx,dom-storage-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D194162
2023-11-28 01:02:01 +00:00
Eden Chuang 76d6e6b69c Bug 1836700 - Remove BusyCount of WorkerPrivate. r=asuth,ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D182718
2023-11-13 04:00:40 +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
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
Kagami Sascha Rosylight 9f2c8f0585 Bug 1842007 - Part 8: Remove DomPromiseListener r=dom-core,edgar
Differential Revision: https://phabricator.services.mozilla.com/D183027
2023-09-19 09:58: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
Peter Van der Beken 9fba1d5220 Bug 1846277 - Remove nsGlobalWindow.h. r=dom-core,necko-reviewers,jesup,farre
Differential Revision: https://phabricator.services.mozilla.com/D184973
2023-08-02 20:41:48 +00:00
Kagami Sascha Rosylight 1baae48856 Bug 1843453 - Add MozPromiseRejectOnDestruction r=bvandersloot,xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D183778
2023-07-27 22:37:59 +00:00
Norisz Fay 50588a0b72 Backed out changeset f7db385873e9 (bug 1843453) for causing bustages on IdentityNetworkHelpers.h CLOSED TREE 2023-07-27 03:39:33 +03:00
Kagami Sascha Rosylight 4574a28b5e Bug 1843453 - Add MozPromiseRejectOnDestruction r=bvandersloot,xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D183778
2023-07-26 22:23:57 +00:00
Stanca Serban d9cfb537bd Backed out changeset 7b759128b1ce (bug 1843453) for causing mochitests failures in test_simple.html. 2023-07-24 23:18:54 +03:00
Kagami Sascha Rosylight 45b8471e36 Bug 1843453 - Add MozPromiseRejectOnDestruction r=bvandersloot,xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D183778
2023-07-24 19:12:10 +00:00
Kagami Sascha Rosylight 6a4b7c0764 Bug 1842007 - Part 3: Extract nsresult conversion from DomPromiseListener r=dom-core,edgar
But not use it in DomPromiseListener because it'll be removed in this patch stack.

Differential Revision: https://phabricator.services.mozilla.com/D183022
2023-07-13 12:43:40 +00:00
Mark Banner 5d59c7aecd Bug 1824613 - Convert consumers of toolkit/mozapps/extensions/ to import ES modules directly. r=extension-reviewers,settings-reviewers,application-update-reviewers,credential-management-reviewers,devtools-reviewers,sync-reviewers,sgalich,bytesized,robwu,skhamis
Depends on D179819

Differential Revision: https://phabricator.services.mozilla.com/D179820
2023-06-02 20:00:35 +00:00
Kris Maglione f9100d622c Bug 1769763: Part 2 - Add debug names to StructuredCloneHolder objects for about:memory. r=mccr8,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D162251
2023-05-23 23:13:36 +00:00
Mark Banner 8219a5c503 Bug 1826062 - Automatic fixes for Prettier 2.0.5 upgrade. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,owlish
Differential Revision: https://phabricator.services.mozilla.com/D177025
2023-05-20 12:26:49 +00:00
Andi-Bogdan Postelnicu 4efa1bd0ba Bug 1276351 - Move away from mozilla::tuple to std::tuple. r=necko-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173256
2023-03-27 07:20:25 +00:00
Sandor Molnar 9db345d4c1 Backed out 2 changesets (bug 1276351) for causing build bustage in image/ClippedImage.cp CLOSED TREE
Backed out changeset e84598eb82c1 (bug 1276351)
Backed out changeset e940b0554484 (bug 1276351)
2023-03-25 14:16:43 +02:00
Andi-Bogdan Postelnicu 447f1e3358 Bug 1276351 - Move away from mozilla::tuple to std::tuple. r=necko-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173256
2023-03-25 06:58:52 +00:00
Iulian Moraru 6d40eee997 Backed out 2 changesets (bug 1276351) for causing multiple failures.
Backed out changeset eeaf4f1e06af (bug 1276351)
Backed out changeset d44cb5704342 (bug 1276351)
2023-03-25 00:08:24 +02:00
Andi-Bogdan Postelnicu a1b827b503 Bug 1276351 - Move away from mozilla::tuple to std::tuple. r=necko-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173256
2023-03-24 18:55:39 +00:00
Kagami Sascha Rosylight 1f08520e4c Bug 1822675 - Part 2: Do not reject with uncatchable exception r=smaug
https://wpt.live/encoding/streams/stringification-crash.html crashes again without this.

Depends on D172794

Differential Revision: https://phabricator.services.mozilla.com/D173026
2023-03-21 09:03:05 +00:00
Kagami Sascha Rosylight f616f55047 Bug 1818655 - Call exposeToActiveJS before passing the args to ThenWithCycleCollectedArgsJS's callback r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D170935
2023-03-01 15:20:26 +00:00
serge-sans-paille 7108cce0a6 Bug 1817719 - Make dom/promise buildable outside of a unified build environment r=andi
Differential Revision: https://phabricator.services.mozilla.com/D170324
2023-02-21 18:57:46 +00:00
Marian-Vasile Laza 3db46c3cc3 Backed out 9 changesets (bug 1817715, bug 1817721, bug 1817716, bug 1817719, bug 1817720, bug 1817722, bug 1817718, bug 1817714, bug 1817717) for BP-hybrid bustages on PacketDumper.h.
Backed out changeset b582db8692bb (bug 1817722)
Backed out changeset f1d37a26a9ea (bug 1817721)
Backed out changeset f0991bfb779c (bug 1817720)
Backed out changeset 42c27b8d075b (bug 1817719)
Backed out changeset 67f07f966ef3 (bug 1817718)
Backed out changeset 408aa730ae68 (bug 1817717)
Backed out changeset 708b5529e7da (bug 1817716)
Backed out changeset f0a3ca660b68 (bug 1817715)
Backed out changeset 36af23356e21 (bug 1817714)
2023-02-21 17:57:00 +02:00
serge-sans-paille 06640ae807 Bug 1817719 - Make dom/promise buildable outside of a unified build environment r=andi
Differential Revision: https://phabricator.services.mozilla.com/D170324
2023-02-21 13:12:28 +00:00
Stanca Serban 771d982cfc Backed out 9 changesets (bug 1817714, bug 1817722, bug 1817721, bug 1817719, bug 1817717, bug 1817720, bug 1817715, bug 1817716, bug 1817718) for causing bp-hybrid bustages in nsFind.cpp. CLOSED TREE
Backed out changeset 8acd5a2263f9 (bug 1817722)
Backed out changeset 299f412fa933 (bug 1817721)
Backed out changeset 345907a5a764 (bug 1817720)
Backed out changeset d710584cc1ee (bug 1817719)
Backed out changeset 7a581148ea00 (bug 1817718)
Backed out changeset 0b9d922e895a (bug 1817717)
Backed out changeset 2878e5488069 (bug 1817716)
Backed out changeset 97b49222483f (bug 1817715)
Backed out changeset a556e575cc13 (bug 1817714)
2023-02-21 11:06:43 +02:00
serge-sans-paille fa5fab194b Bug 1817719 - Make dom/promise buildable outside of a unified build environment r=andi
Depends on D170323

Differential Revision: https://phabricator.services.mozilla.com/D170324
2023-02-21 08:05:46 +00:00
Kagami Sascha Rosylight 3387bc0bd4 Bug 1814644 - Remove GetIncumbentGlobal use in SetUpReadableByteStreamController r=smaug
That was the only case that Promise::CreateInfallible may possibly get nullptr in dom/streams case, so it now just asserts the existence of nsIGlobalObject.

Differential Revision: https://phabricator.services.mozilla.com/D168678
2023-02-02 20:41:28 +00:00
Kagami Sascha Rosylight a98aec7bdc Bug 1811538 - Part 1: Implement Promise::CreateInfallible r=smaug
This does not cover helper functions e.g. Promise::CreateResolvedWithUndefined, to get some early feedback and make sure this is safe.

Differential Revision: https://phabricator.services.mozilla.com/D167696
2023-01-31 19:21:35 +00:00
Iulian Moraru a8e5bce81b Backed out 3 changesets (bug 1811538) for causing build bustages on Promise.cpp. CLOSED TREE
Backed out changeset 0a665be7896a (bug 1811538)
Backed out changeset b949053bae31 (bug 1811538)
Backed out changeset 57d4dbe88611 (bug 1811538)
2023-01-31 19:00:59 +02:00
Kagami Sascha Rosylight af6354bace Bug 1811538 - Part 1: Implement Promise::CreateInfallible r=smaug
This does not cover helper functions e.g. Promise::CreateResolvedWithUndefined, to get some early feedback and make sure this is safe.

Differential Revision: https://phabricator.services.mozilla.com/D167696
2023-01-31 15:49:07 +00:00
Andrew McCreight ce28c41da0 Bug 1805931, part 2 - Automated removal of uses of ROOT and UNROOT CC macros. r=smaug
As of the prior patch, these are no longer needed. I removed
these with a script, then ran clang-format on the files, then
manually reverted a few unrelated changed from the formatter.

Differential Revision: https://phabricator.services.mozilla.com/D164829
2022-12-15 19:45:01 +00:00
Jari Jalkanen 8ba9c8d162 Bug 1799088 - Add DOMException support to DomPromiseListener error reporting. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D161250
2022-11-18 12:38:51 +00:00
Mark Banner 9189ff3f6f Bug 1798018 - Convert consumers of toolkit/modules/tests to import ES modules direct. r=Gijs,webdriver-reviewers,extension-reviewers,settings-reviewers,credential-management-reviewers,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D160664
2022-11-01 13:26:38 +00:00
Peter Van der Beken 784ccbccdb Bug 1796804 - Make async iterables support compatible with MOZ_CAN_RUN_SCRIPT. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D159944
2022-10-22 09:42:27 +00:00