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

458 Коммитов

Автор SHA1 Сообщение Дата
Yaron Tausky 31f8167bc1 Bug 1507479: Make WorkerPrivate::mIsSecureContext const r=perry,asuth
This member was never changed after it was set, but it couldn't be const
because WorkerLoadInfo used a custom StealFrom() function instead of an
idiomatic move constructor and move assignment operator. This commit
replaces StealFrom with its idiomatic counterparts, adds a function that
determines a new worker's secure context status, and uses that function
to initialize the now const mIsSecureContext.

Making constant members const is part of a greater effort to ensure that
data is either modified from a single thread only, or access to it is
synchronized properly.

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

--HG--
extra : moz-landing-system : lando
2018-11-21 20:02:51 +00:00
Andrea Marchesini c292b31a93 Bug 1438945 - Part 9: RemoteWorker in SharedWorkerManager. r=asuth
--HG--
extra : rebase_source : 07a23a3f76ef06d76a456ba785186018e6fb77f1
2018-11-19 15:18:33 -08:00
Andrea Marchesini 9c8f8ff9cc Bug 1438945 - Part 4: errors and communications. r=asuth
--HG--
extra : rebase_source : a73007e48d52c47c698dd2545ae4d61806a3ab53
2018-11-19 15:18:21 -08:00
Andrea Marchesini 0640b7884f Bug 1438945 - Part 3: SharedWorkerService and SharedWorkerManager. r=asuth
--HG--
extra : rebase_source : d6b247d0c6a1eb4074010c8b6baaff9fc1e01d87
2018-11-19 15:18:21 -08:00
Yaron Tausky 4db19652d1 Bug 1504638 - Put some of WorkerPrivate's members behind thread access guards r=asuth,baku,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D10368

--HG--
extra : moz-landing-system : lando
2018-11-13 20:22:40 +00: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
Andrea Marchesini 4439acd683 Bug 1498510 - Move nsICSPEventListener out of CSP object, r=ckerschb 2018-10-23 08:17:13 +02:00
Jim Blandy 7937c2dd77 Bug 1499792: Remove unneeded 'ThrottledEventQueue' forward declarations. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D9008

--HG--
extra : moz-landing-system : lando
2018-10-18 12:20:14 +00:00
Jim Blandy 4200956fe5 Bug 1499468: Simplify WorkerPrivate, now that ThrottledEventQueue::Create is infallible. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D8893

--HG--
extra : moz-landing-system : lando
2018-10-17 08:44:43 +00:00
Andrea Marchesini bc5414c5f3 Bug 1471189 - Removing 'Terminating' state in workers, r=mrbkap 2018-07-12 19:33:41 +02:00
Andrea Marchesini 8fe4d55300 Bug 1472927 - Fix CSP violation events in workers, r=asuth, r=ckerschb 2018-07-10 18:53:03 +02:00
Andrea Marchesini 8afcfe8e31 Bug 1469993 - Grant storage access to a 3rd party, tracking resource if a opened document has user-interaction - part 4 - workers, r=ehsan 2018-07-10 10:09:59 +02:00
Margareta Eliza Balazs c37b51f523 Backed out 9 changesets (bug 1469993) for causing bustage in build/srcdom/base/nsGlobalWindowInner.cpp on a CLOSED TREE
Backed out changeset e89192032fe2 (bug 1469993)
Backed out changeset 4b261595099d (bug 1469993)
Backed out changeset 37182cfe869c (bug 1469993)
Backed out changeset 5b9870995c73 (bug 1469993)
Backed out changeset 55499fcd9738 (bug 1469993)
Backed out changeset 8c1c838d54ba (bug 1469993)
Backed out changeset 12b9c8bfa41f (bug 1469993)
Backed out changeset 04ab7d6c169a (bug 1469993)
Backed out changeset 53885d61244e (bug 1469993)
2018-07-10 11:32:34 +03:00
Andrea Marchesini a8d6a7382d Bug 1469993 - Grant storage access to a 3rd party, tracking resource if a opened document has user-interaction - part 4 - workers, r=ehsan 2018-07-10 10:09:59 +02:00
Thomas Wisniewski 4f6c8c85c1 Bug 1403027 - Do not throw from PerformanceObserver.observe when none of the entryTypes are known (log a JS console warning instead); r=bz
MozReview-Commit-ID: Lx2cjWDX8sh

--HG--
extra : rebase_source : 0305286f0fde08356c72acc71fb6095238270ead
2018-01-24 20:59:04 -05:00
Ben Kelly 4f4a0da820 Bug 1465670 P8 Convert WorkerPrivate::LoadScriptAsPartOfLoadingServiceWorkerScript() to simply IsLoadWorkerScript(). r=asuth 2018-06-05 10:49:13 -07: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 17f3983d0f Bug 1461605 part 1 - Rename CompartmentOptions to RealmOptions. r=luke,bz 2018-05-17 10:59:45 +02:00
Ben Kelly c6174cef5a Bug 1458970 Avoid accessing mClientSource when a worker is Terminating in more places. r=baku 2018-05-04 06:35:36 -07:00
Ben Kelly 00d42d9d6b Bug 1457157 P2 Clear a worker's ClientSource when it reaches Terminating. r=baku 2018-05-02 06:29:26 -07:00
Tarek Ziadé 90bafd1f42 Bug 1452580 - remove RELEASE_OR_BETA defines for PerformanceCounter usage - r=baku,erahm,farre
PerformanceCounters are currently disabled in two ways:

- a preference that's off by default "dom.performance.enable_scheduler_timing"
- calls made only for nightly using #ifndef RELEASE_OR_BETA

In order to simplify the code, let's remove the #ifndef and rely only on the pref.
That will also allows us to use the feature in every version going forward.

The performance will not be impacted since the current code is already using
the (cached) pref value to determine if the counters are used.

MozReview-Commit-ID: 47t2M1O13aH

--HG--
extra : rebase_source : e129e1829f1dc37c019e50e156474c4876d6d6cb
2018-04-24 22:03:06 +02:00
Andrea Marchesini 20806e024b Bug 1455025 - Cleanup some private methods in WorkerPrivate.h, r=asuth 2018-04-19 00:02:08 +02:00
Andrea Marchesini 01dfdace45 Bug 1450644 - Better shutdown approach for Workers - part 2 - Timeout + ControlRunnable, r=asuth 2018-04-17 20:51:04 +02:00
Andrea Marchesini 6866300bc3 Bug 1450644 - Better shutdown approach for Workers - part 1 - CancelingRunnable, r=asuth 2018-04-17 20:51:03 +02:00
Jim Blandy e8bdf3d072 Bug 1454540 - Remove WorkerPrivate::DispatchPrivate, and give WorkerPrivate::Dispatch a default argument instead. r=baku 2018-04-16 20:08:26 -07:00
Tiberius Oros 78bac61f63 Backed out 7 changesets (bug 1450644, bug 1454633) for for failing browser_storage_permission.js on a CLOSED TREE
Backed out changeset f4989e0da221 (bug 1454633)
Backed out changeset 08239799d43e (bug 1450644)
Backed out changeset cbe3ad4833b6 (bug 1450644)
Backed out changeset 0d2088370d0c (bug 1450644)
Backed out changeset 246fb3ee14cd (bug 1450644)
Backed out changeset 629e499c0f75 (bug 1450644)
Backed out changeset ed93e3547096 (bug 1450644)
2018-04-18 01:10:26 +03:00
Andrea Marchesini 21693d26a6 Bug 1450644 - Better shutdown approach for Workers - part 2 - Timeout + ControlRunnable, r=asuth 2018-04-17 20:51:04 +02:00
Andrea Marchesini c2549f7b53 Bug 1450644 - Better shutdown approach for Workers - part 1 - CancelingRunnable, r=asuth 2018-04-17 20:51:03 +02:00
Nika Layzell 0c3ba13e4c Bug 1437167 - Part 1: Stop using PRIntervalTime as the argument to CondVar::Wait and Monitor::Wait, r=mstange, r=froydnj 2018-04-10 17:49:47 -04:00
Tarek Ziadé f9138cc6f4 Bug 1447768 - part 2 - Dispatch counters in the parent process - r=baku
Chromeutils.RequestPerformanceMetrics() is now composed of two parts:
- calls content processes via IPDL to get their counters
- directly dispatch counters from the parent process

MozReview-Commit-ID: HlgcEOzkyAq

--HG--
extra : rebase_source : 60e81a27cd3a1bf1378e6b977529964507633b63
2018-04-04 13:36:25 +02:00
Ben Kelly a6499922db Bug 1448141 P5 Remove the service worker script load failure runnable. r=asuth 2018-04-02 07:50:23 -07:00
Andrea Marchesini 4368f4dfab Bug 1446273 - Remove a optional parameter in WorkerPrivate::DestroySyncLoop, r=catalinb 2018-03-16 15:20:29 +01:00
Tom Ritter 6ebcecc30e Bug 1440195 Add a random context seed to the Performance APIs r=baku
We attach it to WorkerPrivate and DOMNavigationTiming so it will be re-used
when it should.

WorkerPrivate is used in the Performance APIs, Performance Storage Worker,
and Event.

DOMNavigationTiming is used only in the Performance APIs, but the crucial
part is that when the individual DOMNavigationTiming object is re-used,
so will the context seed. This in particular came up with the
nav2_test_document_open.html Web Platform Test which illustrated the fact
that even if you .open() a new document, the performance navigation data
is not supposed to change.

MozReview-Commit-ID: GIv6biEo2jY

--HG--
extra : rebase_source : da2ad8d9d6e0172679c6af14dba72938e9d2012c
2018-03-13 12:36:34 -05:00
Andreea Pavel 067622ac36 Merge mozilla-inbound to mozilla-central. a=merge on a CLOSED TREE 2018-03-15 00:07:17 +02:00
Andrea Marchesini 958050f504 Bug 1445540 - Use WorkerRef in PerformanceStorageWorker, r=smaug 2018-03-14 15:27:13 +01:00
Andrea Marchesini 8d4bb177fa Bug 1436784 - Implement WeakWorkerRef, StrongWorkerRef and ThreadSafeWorkerRef, r=smaug 2018-03-13 21:16:48 +01:00
arthur.iakab 6153368440 Merge mozilla-central to autoland 2018-03-14 12:16:00 +02:00
Tarek Ziadé 86edd52973 Bug 1437438 - Add a performance counter to track scheduler activity - r=farre,froydnj
Adds a PeformanceCounter class that is used in DocGroup and WorkerPrivate
to track runnables execution and dispatch counts.

MozReview-Commit-ID: 51DLj6ORD2O

--HG--
extra : rebase_source : b481c9aa3b735569722bb7472872ec2d22adcb89
2018-03-06 10:19:19 +01:00
Andrea Marchesini 6f7a4bfd5d Bug 1445199 - Remove JSContext parameter in worker NotifyHolder, r=smaug 2018-03-13 15:25:50 +01:00
Boris Zbarsky 7dd7848880 Bug 1442313 part 2. Push down the value of xpc::IsInAutomation into workers. r=bkelly
MozReview-Commit-ID: 5h51oqaf0R
2018-03-01 14:24:20 -05:00
Andreea Pavel 14a1838c54 Backed out 4 changesets (bug 1442313) for frequently failing crashtests on android, e.g. libeditor/crashtests/772282.html and layout/generic/crashtests/542136-1.html a=backout
Backed out changeset bfef9139500f (bug 1442313)
Backed out changeset 660332ce1bf0 (bug 1442313)
Backed out changeset 9788a46b8874 (bug 1442313)
Backed out changeset 8fc2c103027b (bug 1442313)
2018-03-02 18:08:23 +02:00
Boris Zbarsky 3f718c4054 Bug 1442313 part 2. Push down the value of xpc::IsInAutomation into workers. r=bkelly
MozReview-Commit-ID: 5h51oqaf0R
2018-03-01 14:24:20 -05:00
Ben Kelly 7506d48306 Bug 1434701 P3 Pass ServiceWorkerRegistrationDescriptor to ServiceWorkerRegistration::CreateForWorker(). r=asuth 2018-02-14 14:23:15 -05:00
Andrea Marchesini 0c305c1eaa Bug 1435263 - Get rid of WorkerPrivateParent template - part 18 - private/public sections, r=bkelly 2018-02-08 09:33:34 +01:00
Andrea Marchesini 5211065bf5 Bug 1435263 - Get rid of WorkerPrivateParent template - part 17 - WorkerPrivateParent, r=bkelly 2018-02-08 09:33:34 +01:00
Andrea Marchesini 9241a14957 Bug 1435263 - Get rid of WorkerPrivateParent template - part 16 - Dispatch methods, r=bkelly 2018-02-08 09:33:34 +01:00
Andrea Marchesini 5deb3ddc49 Bug 1435263 - Get rid of WorkerPrivateParent template - part 15 - update methods, r=bkelly 2018-02-08 09:33:34 +01:00
Andrea Marchesini e898847369 Bug 1435263 - Get rid of WorkerPrivateParent template - part 14 - MaybeWrapAsWorkerRunnable and ProxyReleaseMainThreadObjects, r=bkelly 2018-02-08 09:33:34 +01:00
Andrea Marchesini 67ce33a460 Bug 1435263 - Get rid of WorkerPrivateParent template - part 13 - Start/Close/Kill/Terminate, r=bkelly 2018-02-08 09:33:34 +01:00
Andrea Marchesini 80346a9dd6 Bug 1435263 - Get rid of WorkerPrivateParent template - part 12 - Freeze/Thaw, r=bkelly 2018-02-08 09:33:33 +01:00