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

129 Коммитов

Автор SHA1 Сообщение Дата
Jan Varga 860132797b Bug 1803062 - Switch from ordinary bool errors to nsresult errors in code for handling sync loops; r=dom-worker-reviewers,smaug
Differential Revision: https://phabricator.services.mozilla.com/D163559
2022-12-12 16:09:12 +00:00
Jan Varga 940cf12bc4 Bug 1791747 - AutoSyncLoopHolder::GetEventTarget should return nsISerialEventTarget (instead of nsIEventTarget); r=dom-worker-reviewers,smaug
Differential Revision: https://phabricator.services.mozilla.com/D157805
2022-10-28 06:18:10 +00:00
Jens Stutte 4b7e774817 Bug 1767214: Avoid executing WorkerMainThreadRunnable::Run late in shutdown. r=dom-worker-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D145577
2022-05-12 16:13:28 +00:00
Kagami Sascha Rosylight 9902521a4c Bug 1768189 - Part 43: Apply modernize-concat-nested-namespaces to dom/workers/JSExecutionManager.cpp ... r=andi
Depends on D145778

Differential Revision: https://phabricator.services.mozilla.com/D145779
2022-05-09 20:41:20 +00:00
Eden Chuang 2266b31d41 Bug 1744025 - Replace include "mozilla/dom/WorkerPrivate.h" with include "mozilla/dom/WorkerScope.h" where WorkerPrivate->GlobalScope() is called. r=dom-worker-reviewers,smaug,jstutte
#include "mozilla/dom/WorkerScope.h" is removed from WorkerPrivate.h, where calling WorkerPrivate::GlobalScope() without include "WorkerScope.h" makes WorkerScope as an incomplete type.


Depends on 132800

Depends on D132800

Differential Revision: https://phabricator.services.mozilla.com/D133483
2022-01-25 08:53:03 +00:00
Jens Stutte a3884ad516 Bug 1741182: Harmonize WorkerRunnable derived classes' overrides of Cancel. r=dom-worker-reviewers,smaug
Differential Revision: https://phabricator.services.mozilla.com/D135679
2022-01-12 14:43:09 +00:00
Norisz Fay 5edb88e27a Backed out 9 changesets (bug 1744025) for causing wpt failures on CheckedUnsafePtr.h CLOSED TREE
Backed out changeset 89dca4fc5940 (bug 1744025)
Backed out changeset 7aa395dcdbe4 (bug 1744025)
Backed out changeset 1580a4ea1a85 (bug 1744025)
Backed out changeset af171636a87f (bug 1744025)
Backed out changeset a5edfa1c9cd6 (bug 1744025)
Backed out changeset 8abd6ba69815 (bug 1744025)
Backed out changeset cfb822df5b3f (bug 1744025)
Backed out changeset 5598943a94fd (bug 1744025)
Backed out changeset 43186fbbf8b4 (bug 1744025)
2021-12-15 18:46:01 +02:00
Eden Chuang 4146950108 Bug 1744025 - Replace include "mozilla/dom/WorkerPrivate.h" with include "mozilla/dom/WorkerScope.h" where WorkerPrivate->GlobalScope() is called. r=dom-worker-reviewers,smaug,jstutte
#include "mozilla/dom/WorkerScope.h" is removed from WorkerPrivate.h, where calling WorkerPrivate::GlobalScope() without include "WorkerScope.h" makes WorkerScope as an incomplete type.


Depends on 132800

Depends on D132800

Differential Revision: https://phabricator.services.mozilla.com/D133483
2021-12-15 13:48:19 +00:00
Simon Giesecke 383ac52946 Bug 1696347 - Remove redundant nullptr checks of return value of infallible new in dom/workers. r=dom-worker-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D107179
2021-03-04 09:14:33 +00:00
Simon Giesecke b1c81adc95 Bug 1678561 - Fix includes in dom/workers to some degree. r=dom-workers-and-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D97741
2020-11-26 13:21:15 +00:00
Bas Schouten 1bc21ff19c Bug 1563335 - Part 1: Implement mechanism to throttle JS execution. r=smaug,asuth
Differential Revision: https://phabricator.services.mozilla.com/D59321

--HG--
extra : moz-landing-system : lando
2020-03-26 00:36:24 +00:00
Perry Jiang bca3fcb5c6 Bug 1603484 - worker script evaluation resulting in abrupt completion shouldn't be a start failure r=dom-workers-and-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D62371

--HG--
extra : moz-landing-system : lando
2020-02-18 18:49:59 +00:00
Simon Giesecke b50347f917 Bug 1611415 - Prefer using std::move over forget. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-13 14:38:48 +00:00
Csoregi Natalia b5e04bbb01 Backed out changeset fb7235b2a1b3 (bug 1603484) for permafailing on shared-worker-import-data-url.any.html. CLOSED TREE 2020-02-13 15:46:32 +02:00
Perry Jiang fe050e8bb2 Bug 1603484 - worker script evaluation resulting in abrupt completion shouldn't be a start failure r=dom-workers-and-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D62371

--HG--
extra : moz-landing-system : lando
2020-02-12 18:20:02 +00:00
shindli 91aa0518dd 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 f604a47fa5 Bug 1611415 - Applied FixItHints from mozilla-non-std-move. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-12 17:24:41 +00:00
Simon Giesecke 0cc72577b5 Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/workers. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D62562

--HG--
extra : moz-landing-system : lando
2020-02-12 10:38:22 +00:00
Boris Zbarsky dd6deca547 Bug 1575204. Fix crash when trying to run worker runnables on a not-ready-for-it worker thread. r=baku
We're getting crashes because either there's no CycleCollectedJSContext or it
has a null JSContext.  Hard to tell which, and whether this is happening
because our runnable comes really early in thread setup or really late in
thread teardown.  In either case, this is restoring the null-check that used to
be there in this code.

Differential Revision: https://phabricator.services.mozilla.com/D43804

--HG--
extra : moz-landing-system : lando
2019-08-29 07:40:58 +00:00
Boris Zbarsky bb28e110f5 Bug 1573589. Be more explicit about propagating the "current runnable's global" through nested event loops in workers. r=baku
Some worker debugger runnables (the ones that want to evaluate script against a
debugger sandbox) depend on the JSContext being in a particular Realm before
they run, but don't really store which Realm that should be.  Instead of
propagating that state via the current Realm of the JSContext across nested
event loops, we want to propagate it explicitly.

Differential Revision: https://phabricator.services.mozilla.com/D41790

--HG--
extra : moz-landing-system : lando
2019-08-15 12:51:58 +00:00
Boris Zbarsky 356eb6dfd9 Bug 1547923 part 5. Start using nsIGlobalObject::GetGlobalJSObjectPreserveColor where possible. r=mccr8,jonco
Differential Revision: https://phabricator.services.mozilla.com/D29706

--HG--
extra : moz-landing-system : lando
2019-05-03 15:15:31 +00:00
Olli Pettay 1b790f3246 Bug 1522316, use medium high priority queue for worker->main thread control messages, r=baku
If main thread is busy handling runnables in the normal priority queue, control-type of messages from
workers are possibly postponed to run after those. That can lead to bad performance, if the page
expects workers to be able to proceed simultanously with the main thread.
This patch makes the control messages to use medium high priority queue in order to try to
ensure they are handled in timely manner.
Pref dom.worker.use_medium_high_event_queue can be set to false to disable this new behavior.

Differential Revision: https://phabricator.services.mozilla.com/D22128

--HG--
extra : rebase_source : 447dec6dbcccaa0206a1815c21ccf713c523fc91
2019-03-05 18:47:05 +02:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Jim Blandy 7ec799b8fc Bug 1426467: Part 4: Segregate WorkerDebuggeeRunnables into their own queues. r=baku
Remove WorkerPrivate::mQueuedRunnables and its associated functions. The
approach they implement can never be correct, as the parent window gets
'resumed' whenever the debugger resumes execution after a breakpoint. The
interrupted JavaScript invocation has not yet completed, so it is not yet time
to run mQueuedRunnables. Simply re-enqueing them at that point can cause
messages from the worker to arrive out of order.

Instead, we create a separate ThrottledEventQueue,
WorkerPrivate::mMainThreadDebuggeeEventTarget especially for
WorkerDebuggeeRunnables, runnables sent from the worker to the main thread that
should not be delivered to a paused or frozen content window. This queue is
paused and resumed by WorkerPrivate::Freeze, WorkerPrivate::Thaw,
WorkerPrivate::ParentWindowPaused, and WorkerPrivate::ParentWindowResumed.

Since this affects when WorkerDebuggeeRunnables are delivered relative to other
administrative worker runnables, WorkerDebuggeeRunnable must use a
ThreadSafeWorkerRef to ensure that the WorkerPrivate sticks around long enough
for them to run properly.

Depends on D9219

Differential Revision: https://phabricator.services.mozilla.com/D9220

--HG--
extra : moz-landing-system : lando
2018-10-23 06:30:30 +00:00
Jan de Mooij 01fa47134b Bug 1479363 part 4 - Use JSAutoRealm instead of JSAutoRealmAllowCCW in dom/workers and dom/worklet. r=baku 2018-07-31 08:37:17 +02:00
Jan de Mooij 80adc67aba Bug 1478955 part 1 - Rename JSAutoRealm to JSAutoRealmAllowCCW. r=luke 2018-07-28 12:12:26 +02:00
Andrea Marchesini 037d3a703f Bug 1455256 - Port more components to WorkerRef - part 1 - WorkerProxyToMainThreadRunnable, r=asuth 2018-06-18 16:37:21 -04:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Jan de Mooij 80e44e8003 Bug 1461292 part 1 - Rename JSAutoCompartment to JSAutoRealm. r=bz,luke 2018-05-16 10:53:16 +02:00
Boris Zbarsky 9bdcffc985 Bug 1436902 part 3. Replace usage of NS_IMPL_ISUPPORTS_INHERITED0 with NS_INLINE_DECL_REFCOUNTING_INHERITED when possible. r=mccr8
The change to RootAccessible.cpp fixes an obvious bug introduced in bug 741707.

The visibility changes in gfx/thebes are because NS_DECL_ISUPPORTS has a
trailing "public:" that those classes were relying on to have public
constructors.

MozReview-Commit-ID: IeB8KIJCGhU
2018-02-12 15:44:40 -05:00
Andrea Marchesini dce09604e1 Bug 1436744 - Get rid of WorkerCheckAPIExposureOnMainThreadRunnable, r=catalinb 2018-02-12 21:02:22 +01:00
Andrea Marchesini f6957bfded Bug 1435196 - Move the webidl binding interfaces out of WorkerPrivate - part 1 - WebIDL bindings, r=bkelly 2018-02-08 08:26:05 +01:00
Andrea Marchesini 8cdf705535 Bug 1435174 - Remove the renaming 'using namespace workers', r=bkelly 2018-02-05 19:55:07 +01:00
Andrea Marchesini 2c7c69af24 Bug 1432963 - Fixing workers headers - part 14 - WorkerPrivate without workers namespace, r=smaug 2018-01-31 08:24:08 +01:00
Andrea Marchesini 063723a1f0 Bug 1432963 - Fixing workers headers - part 13 - WorkerHolder without workers namespace, r=smaug 2018-01-31 08:23:44 +01:00
Andrea Marchesini c4b257cdc6 Bug 1432963 - Fixing workers headers - part 12 - WorkerRunnable without workers namespace, r=smaug 2018-01-31 08:22:56 +01:00
Andrea Marchesini 9774cec092 Bug 1413112 - Fixing includes in dom/workers, r=bkelly 2018-01-30 10:14:00 +01:00
Andrea Marchesini 73712f7d05 Bug 1405290 - Improve logging of workers when shutting down - part 3 - WorkerHolder with names, r=asuth 2017-11-15 07:58:38 +01:00
Nika Layzell 3409141758 Bug 1414974 - Part 2: Switch many consumers to nsGlobalWindow{Inner,Outer}, r=smaug
This is a large patch which tries to switch many of the external consumers of
nsGlobalWindow to instead use the new Inner or Outer variants.

MozReview-Commit-ID: 99648Lm46T5
2017-11-09 10:44:47 -05:00
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Carsten "Tomcat" Book 8a1350b5a6 Backed out changeset 4f6302a98ae4 (bug 1372405)
--HG--
extra : rebase_source : 41632f3158e88e692809731394a683d065a73dfb
2017-06-21 13:59:26 +02:00
Bill McCloskey 6b3e84ed5f Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00
Carsten "Tomcat" Book ea1b86680c Backed out changeset 9846de3bd954 (bug 1372405)
--HG--
extra : rebase_source : 5d4a48e8ec394c329994689d938d2a6e9b2752b0
2017-06-20 08:27:02 +02:00
Bill McCloskey 4592152411 Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07:00
Andrea Marchesini 31b48170ed Bug 1368296 - Renaming WorkerProxyToMainThreadRunnable::RunBackOnWorkerThread to RunBackOnWorkerThreadForCleanup and improving the description for this method, r=asuth 2017-06-02 11:05:27 +02:00
Michael Layzell 67c4d0b3c1 Bug 1331434 - Part 7: Handle custom cleanup after throwing in /dom/workers, r=baku
MozReview-Commit-ID: 1hKUDi9Oxg7
2017-03-07 19:06:48 -05:00
Andrea Marchesini 94547f20bb Bug 604026 - Sync event loops in workers should be created only if compatible with the worker shutdown status, r=bkelly 2017-01-05 10:05:32 +01:00
Ben Kelly d48deb5760 Bug 1300659 P4 Use ThrottledEventQueue in workers. r=baku 2016-11-07 12:30:17 -08:00
Andrea Marchesini a9fedb7608 Bug 1272066 - Add telemetry for sync worker runnables, r=bkelly 2016-10-25 15:39:30 +02:00
Ben Kelly e5c5dd65ac Bug 1300658 P2 Make WorkerRunnable's destined for main thread use the MainThreadTaskQueue. r=baku 2016-09-13 20:14:02 -07:00