Commit Graph
76 Commits
Author SHA1 Message Date
Karl Tomlinson 7464d8e74d Bug 1898684 Use AutoJSAPI while run()ing JS::Dispatchable r=dom-core,peterv
Differential Revision: https://phabricator.services.mozilla.com/D211516
2024-06-03 23:32:00 +00:00
Jon Coppeard 524de2ba8b Bug 1895661 - Part 1: Move GC zeal functions to JS namespace and add separate constants for browser and shell frequency r=sfink
Sensible defaults are very different for the browser and the shell so I added
separate constants. I think the JS testing functions can get called from the
browser and so may pick the wrong default but it's not too serious.

Differential Revision: https://phabricator.services.mozilla.com/D210058
2024-05-13 16:31:20 +00:00
Jan de Mooij 64f0528008 Bug 1851854 - Use SetPrefableContextOptions for worklet JS ContextOptions. r=mccr8
`SetPrefableContextOptions` currently has to be called on the main thread, so store
the options in `StartModuleLoadRunnable` and copy them on the worklet thread.

This doesn't update the options when the prefs are changed, but we've been moving
to read-on-startup for prefs so we probably don't need that.

Differential Revision: https://phabricator.services.mozilla.com/D187767
2023-09-11 10:09:45 +00:00
Andrew McCreight 9498c0e384 Bug 1811327 - Be more precise in the types passed around to WorkletThread methods. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D167884
2023-02-02 23:18:10 +00:00
Nika Layzell 119713a821 Bug 1799222 - Part 1: Prevent accidental dispatches to threadpool and timer threads, r=xpcom-reviewers,necko-reviewers,geckoview-reviewers,media-playback-reviewers,jesup,m_kato,padenot,kmag
Differential Revision: https://phabricator.services.mozilla.com/D161349
2022-12-16 17:09:16 +00:00
Tom Schuster 3ce17fcff1 Bug 1774866 - Always allow cloning error stacks. r=nika,sfink,smaug
Differential Revision: https://phabricator.services.mozilla.com/D164577
2022-12-15 19:03:53 +00:00
Nika Layzell b6897a896a Bug 1804093 - Part 5: Eliminate WorkerPrincipal and WorkletPrincipals, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D163856
2022-12-12 22:08:36 +00:00
Cristian Tuns de12c42c7f Backed out changeset 42315c023471 (bug 1799222) for causing multiple failures CLOSED TREE 2022-12-06 16:35:58 -05:00
Nika Layzell e8f474cee1 Bug 1799222 - Prevent accidental dispatches to threadpool and timer threads, r=xpcom-reviewers,necko-reviewers,geckoview-reviewers,media-playback-reviewers,jesup,m_kato,padenot,kmag
Differential Revision: https://phabricator.services.mozilla.com/D161349
2022-12-06 20:44:15 +00:00
Kagami Sascha Rosylight 4d68f1d57d Bug 1769290 - Part 10: Apply mozilla-js-handle-rooted-typedef against remaining dom directories r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D148283
2022-06-05 20:55:00 +00:00
Kagami Sascha Rosylight 5b4aa1d7b6 Bug 1768189 - Part 44: Apply modernize-concat-nested-namespaces to dom/workers/WorkerStatus.h ... r=andi
Depends on D145779

Differential Revision: https://phabricator.services.mozilla.com/D145780
2022-05-09 20:41:20 +00:00
Steve Fink 5fa1cff317 Bug 1732161 - Track CCReason for all cycle collections (replacing ccType) r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D126395
2021-10-14 18:15:40 +00:00
criss 018a582464 Backed out 6 changesets (bug 1732161) for causing linux base toolchains bustages. CLOSED TREE
Backed out changeset 766a1bc74001 (bug 1732161)
Backed out changeset aed63de28354 (bug 1732161)
Backed out changeset 98eaff0d5124 (bug 1732161)
Backed out changeset 76c21ec8ffb6 (bug 1732161)
Backed out changeset 49dcac272f05 (bug 1732161)
Backed out changeset 67d81f8f413e (bug 1732161)
2021-10-14 05:38:08 +03:00
Steve Fink f3bfff8a49 Bug 1732161 - Track CCReason for all cycle collections (replacing ccType) r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D126395
2021-10-13 22:32:59 +00:00
Narcis Beleuzu 65f3ea6e63 Backed out 6 changesets (bug 1732161) for build bustages on nsCycleCollectionParticipant.h CLOSED TREE
Backed out changeset 7271b938e71a (bug 1732161)
Backed out changeset d24b8450b7ed (bug 1732161)
Backed out changeset fb1838a152f2 (bug 1732161)
Backed out changeset 84787a58a428 (bug 1732161)
Backed out changeset 6acb82c0ac3c (bug 1732161)
Backed out changeset 50d17b172185 (bug 1732161)
2021-10-12 07:13:13 +03:00
Steve Fink f0c09d1a30 Bug 1732161 - Track CCReason for all cycle collections (replacing ccType) r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D126395
2021-10-11 21:39:08 +00:00
Butkovits Atila ec4d11eaf6 Backed out 6 changesets (bug 1732161) for causing assertion failures in CCGCScheduler.h. CLOSED TREE
Backed out changeset 88dbe1a7478c (bug 1732161)
Backed out changeset a5a2c9c53340 (bug 1732161)
Backed out changeset d83b36b92051 (bug 1732161)
Backed out changeset b339e54078d7 (bug 1732161)
Backed out changeset 0cbf901cab8b (bug 1732161)
Backed out changeset b3e894d590d9 (bug 1732161)
2021-10-05 03:47:08 +03:00
Steve Fink eb884e4260 Bug 1732161 - Track CCReason for all cycle collections (replacing ccType) r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D126395
2021-10-04 23:06:08 +00:00
Olli Pettay 7ac6295b85 Bug 1724777, optimize suppressed MicroTask handling, r=mccr8
The test is in theory racy, but trying to limit the cases when it might behave badly
by running it on opt desktop builds only. Without the patch the 'period' check takes over 400ms locally and with the
patch 1-3ms.

The changes are just trying to optimize execution, not change the behavior.
Use of SuppressedMicroTasks is perhaps a bit odd, but it helps keeping
SavedMicroTaskQueue and similar code simple.

Differential Revision: https://phabricator.services.mozilla.com/D122290
2021-08-12 16:01:08 +00:00
Nicolas B. Pierron 41c756a1f0 Bug 1458339 part 2 - Use shared memory to initialize the JS engine. r=smaug,tcampbell,necko-reviewers
This modification relies on the shared memory implemented in Bug 1698045 and on
the ability to encode and decode self-hosted content from Bug 1668361 to
optimize the JS engine initialization by making the parent process encode the
self-hosted stencil, such that all other runtime initialization would only have
to decode it, including content processes.

Differential Revision: https://phabricator.services.mozilla.com/D110578
2021-05-12 13:57:56 +00:00
Simon Giesecke 46908cfb51 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Andi-Bogdan Postelnicu 602c06fa0c Bug 1626555 - Add dom/worklet to the list of non-unified-build-compatible directories. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D97175
2020-11-16 19:57:25 +00:00
Bas Schouten 73771dfc18 Bug 1669256 - Part 1: Remove AbstractEventQueue and de-templatize ThreadEventQueue. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D92709
2020-10-09 17:56:34 +00:00
Simon Giesecke a69d79b6db Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Jon Coppeard 5c542a439c Bug 1642974 - Don't expose WeakRef targets which are DOM wrappers whose target has been collected r=smaug,sfink
WeakRef targets that are wrappers to DOM objects are preserved when the WeakRef is created.  This checks whether the wrapper is still preserved in deref() and if it is found to have been released, the target is cleared.

The patch adds a new DOMJSClass hook to deal with getting the wrapper cache for non-nsISupports objects.

Differential Revision: https://phabricator.services.mozilla.com/D78061
2020-06-06 06:58:42 +00:00
Karl Tomlinson 1d3c33d07f Bug 1625372 request interrupt of AudioWorklet JS on force shutdown r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D71915
2020-05-15 08:24:06 +00:00
Csoregi Natalia 795c5e8da1 Backed out 5 changesets (bug 1625372) for assertion failures on GraphDriver.cpp. CLOSED TREE
Backed out changeset b9feee4f447c (bug 1625372)
Backed out changeset d86f066bd68b (bug 1625372)
Backed out changeset 7a38398623f8 (bug 1625372)
Backed out changeset 6e9928fb37d1 (bug 1625372)
Backed out changeset ca93e9921c05 (bug 1625372)
2020-05-13 13:09:22 +03:00
Karl Tomlinson 88ae1ece22 Bug 1625372 request interrupt of AudioWorklet JS on force shutdown r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D71915
2020-05-12 07:10:51 +00:00
Paul Adenot 30e5da46e0 Bug 1631713 - Align the maximum memory usage of worklets on workers. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D71966
2020-04-23 05:17:04 +00:00
Tom Schuster dcc2de6895 Bug 1626100 - Introduce an ExceptionStack class and StealPendingExceptionStack. r=sfink,mccr8
See also the bug for a more detailed description.

Differential Revision: https://phabricator.services.mozilla.com/D69636
2020-04-09 12:35:29 +00:00
Simon Giesecke 9bcfd47601 Bug 1611415 - Prefer using std::move over forget. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980
2020-02-13 14:38:48 +00:00
shindli 6bb3487209 Backed out changeset 0c982bc69cb3 (bug 1611415) for causing build bustages in /builds/worker/workspace/build/src/obj-firefox/dist/include/nsCOMPtr CLOSED TREE 2020-02-12 20:13:29 +02:00
Simon Giesecke d45525793f Bug 1611415 - Applied FixItHints from mozilla-non-std-move. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980
2020-02-12 17:24:41 +00:00
Andrea Marchesini b0a3a127a6 Bug 1612570 - Add promise support to worklet, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D61406
2020-02-06 13:54:19 +00:00
Narcis Beleuzu 0f04ff356e Backed out changeset 5d69fddf45db (bug 1612570) for failing dom/worklet/tests/test_promise.html after bug 1611855 got backed out. CLOSED TREE 2020-02-06 14:37:36 +02:00
Andrea Marchesini b8d962fee5 Bug 1612570 - Add promise support to worklet, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D61406
2020-02-05 22:16:21 +00:00
Arthur Iakab b46d5ab9f1 Backed out changeset 7dddff2d1120 (bug 1612570) for causing mochitest failures on test_promise.html.
CLOSED TREE
2020-02-03 10:27:47 +02:00
Andrea Marchesini 9901807c97 Bug 1612570 - Add promise support to worklet, r=smaug
Depends on D61307

Differential Revision: https://phabricator.services.mozilla.com/D61406
2020-02-03 07:26:43 +00:00
Karl Tomlinson 82e0bcbb06 Bug 1594632 remove mExitLoop assertion, which is invalid when thread creation fails r=baku
Depends on D52614

Differential Revision: https://phabricator.services.mozilla.com/D52615
2019-12-06 01:40:49 +00:00
Olli Pettay 705612b473 Bug 1608093 - Remove support for multiple CycleCollectedJSContexts per CycleCollectedJSRuntime, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D59338
2020-01-09 17:27:10 +00:00
Paul Bone 9205b98aca Bug 1584892 - Remove CycleCollectedJSContext::Initialize's nursery size param r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D47873
2019-12-16 04:14:55 +00:00
Paul Bone 4581fcd767 Bug 1584892 - Use the default max nursery size for workers r=baku,karlt
This patch updates this for workers and worklets.

Differential Revision: https://phabricator.services.mozilla.com/D47872
2019-12-16 03:55:24 +00:00
Karl Tomlinson 3fa2128fe2 Bug 1565956 close BackgroundChild before deleting CycleCollectedJSContext r=baku
Depends on D53131

Differential Revision: https://phabricator.services.mozilla.com/D53132
2019-11-17 21:16:53 +00:00
Karl Tomlinson e8b0d7113f Bug 1593766 relax assertion to handle case of no CycleCollectedJSContext created r=baku
This can happen when addModule() has not be called, but the thread is created
just to send a NotifyWorkletFinished message.

Differential Revision: https://phabricator.services.mozilla.com/D51925
2019-11-06 12:36:41 +00:00
Karl Tomlinson 1058908b70 Bug 1578623 include stack with console message for uncaught exception in worklet script r=baku
Differential Revision: https://phabricator.services.mozilla.com/D44609
2019-09-09 00:41:44 +00:00
Noemi Erli cb793818c1 Backed out 9 changesets (bug 1578623) for causing Windows build bustages CLOSED TREE
Backed out changeset 52a86c60c866 (bug 1578623)
Backed out changeset e4fddd3d24b4 (bug 1578623)
Backed out changeset 65a7c4daec27 (bug 1578623)
Backed out changeset 3badf9215788 (bug 1578623)
Backed out changeset 71e58ee8f684 (bug 1578623)
Backed out changeset 0128e12a910f (bug 1578623)
Backed out changeset 8242877392bd (bug 1578623)
Backed out changeset 6d7be8a22f8b (bug 1578623)
Backed out changeset 3be609a9be36 (bug 1578623)
2019-09-09 03:37:09 +03:00
Karl Tomlinson 35bd4aca5c Bug 1578623 include stack with console message for uncaught exception in worklet script r=baku
Differential Revision: https://phabricator.services.mozilla.com/D44609
2019-09-06 02:10:32 +00:00
Karl Tomlinson 978327d61c Bug 1578623 create worklet global with JSPrincipals having reference to WorkletImpl r=baku,bzbarsky
This will permit implementation of JSPrincipals::write().

Differential Revision: https://phabricator.services.mozilla.com/D44604
2019-09-06 02:01:44 +00:00
Karl Tomlinson 95cdf84c18 Bug 1558128 report errors from worklet scripts to console r=baku
There is no ErrorEvent dispatched to WorkletGlobalScope.
See also https://github.com/whatwg/html/issues/2611

Differential Revision: https://phabricator.services.mozilla.com/D44600
2019-09-04 09:46:41 +00:00
Karl Tomlinson 6d914f0b98 Bug 1542931 add CycleCollectedJSContext::ReportError() r=baku
to make AutoJSAPI error reporting safe for worklets.

Parameter order matches xpc::ErrorReport::Init().

Depends on D34477

Differential Revision: https://phabricator.services.mozilla.com/D34478
2019-06-12 19:11:04 +00:00