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

4346 Коммитов

Автор SHA1 Сообщение Дата
Jeff Walden af9a670e28 Bug 1510007 - Move JSFreeOp's definition to js/public/MemoryFunctions.h, and make jsapi.h not #include that header. r=sfink
--HG--
extra : rebase_source : 4d6debefd66b89647df53c104b8560ba2de68abd
2018-11-21 18:11:15 -08:00
Andrea Marchesini c55d254325 Bug 1508824 - SharedWorker.onconnect event should be a MessageEvent with an empty string as data, r=asuth 2018-11-27 08:44:47 +01:00
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
Blake Kaplan 3ca6a6bcab Bug 1508595 - Only set an intercept controller when needed. r=asuth
We only need to expose an intercept controller in SharedWorkers if we're on
the non-parent-intercept version of ServiceWorkers or if e10s is off.
nsDocShell already does this dance and we have to mirror it.

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

--HG--
extra : moz-landing-system : lando
2018-11-21 01:06:08 +00:00
Razvan Maries 208d16134b Merge mozilla-inbound to mozilla-central a=merge 2018-11-20 07:03:17 +02:00
Tarek Ziadé 63637ef222 Bug 1497124 - Added some memory info in the performance counters - r=jya,jonco
Add some memory usage information to the Performance counters and make everything asynchronous.

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

--HG--
extra : moz-landing-system : lando
2018-11-19 22:51:12 +00:00
Sebastian Hengst 6abf386251 Backed out changeset 7efd8b5c5b93 (bug 1507479) for asserting in caps/nsJSPrincipals.cpp. CLOSED TREE 2018-11-19 23:19:07 +02:00
Yaron Tausky 246b04e791 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-19 15:52:40 +00:00
Luke Wagner 00940fee0d Bug 1505632 - Baldr: correctly propagate AbortError from consume stream body operation (r=lth,baku,Ms2ger) 2018-11-16 10:32:20 -06:00
Blake Kaplan d07117bf43 Bug 1438945 - Remove the string parameter in favor of always passing in an nsIURI. r=asuth
The duplication wasn't necessary.

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

--HG--
extra : rebase_source : caa6bb5df364943ff7abf36155fa883fead1f8e6
2018-11-19 15:18:34 -08:00
Blake Kaplan fee145cbe3 Bug 1438945 - Allow passing an existing URL into the Worker script loader. r=asuth
In the next patch I get rid of the duplicated arguments.

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

--HG--
extra : rebase_source : 2c21364406b9a757a78ae523e212a180f848ff9b
2018-11-19 15:18:34 -08:00
Blake Kaplan 30bf37d472 Bug 1438945 - Pass around URIs instead of strings in RemoteWorker. r=asuth
In order to fix the problem mentioned in comment 91 & co, we need to hold onto
the URI object that we resolve in the child process when we construct the
SharedWorker. Otherwise, we risk the Blob getting deallocated from under us.
This patch isn't sufficient to fix that problem, however, because the worker
code itself ends up going back through strings. I fix that in the next couple
of patches.

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

--HG--
extra : rebase_source : c77854f00c0d7a102e73e0c81f59cc217f43fd69
2018-11-19 15:18:34 -08:00
Blake Kaplan 9b7c410ae7 Bug 1438945 - Fix process selection comments. r=asuth
This separates out the parent process from the list of child processes and
makes our handling of non-e10s more explicit.

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

--HG--
extra : rebase_source : 3d4a5c5b427a5ad709468b4063793cb7bce27117
2018-11-19 15:18:34 -08:00
Blake Kaplan 35a2a67c5b Bug 1438945 - Fix typos in comments. r=asuth
Some small fixes that I noticed.

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

--HG--
extra : rebase_source : b327c6690c25992140f9ddf98712b3b23e41b3be
2018-11-19 15:18:33 -08:00
Blake Kaplan 47e2d13b9b Bug 1438945 - Fix the suspend and freezing logic. r=asuth
This implements the behavior that as long as there's one non-frozen or
non-suspended actor, we resume or thaw the manager.

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

--HG--
extra : rebase_source : d5dd0e87581c94b383f1e155b03f63398b2a14a7
2018-11-19 15:18:33 -08:00
Andrea Marchesini c2d9fd8153 Bug 1438945 - Part 13: keeping ContentProcess alive. r=asuth,mrbkap
--HG--
extra : rebase_source : 10f03713c5f31f3a41e4f45cde367f5daaa5ebd8
2018-11-19 15:18:33 -08:00
Andrea Marchesini b08cb98eb5 Bug 1438945 - Part 12: Spawning a new process if needed. r=asuth
--HG--
extra : rebase_source : 76cfdb0b7798d73d755183f8c431d631f67b9fac
2018-11-19 15:18:33 -08:00
Andrea Marchesini e9bd43a3d1 Bug 1438945 - Part 11: selection of RemoteWorker actors. r=asuth,mrbkap
--HG--
extra : rebase_source : 900cf926e5771964a7482cfba8c546aaf7877c36
2018-11-19 15:18:33 -08:00
Andrea Marchesini db9d439a1d Bug 1438945 - Part 10: RemoteWorkerObserver. r=asuth
--HG--
extra : rebase_source : 4c4b6e7e896e0cc3d297ee0b14fb449ce09361eb
2018-11-19 15:18:33 -08: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 7c7e94be60 Bug 1438945 - Part 8: RemoteWorker IPC. r=asuth
--HG--
extra : rebase_source : 06a8e3a2e60d6ff9596fcbacbd4356368475d3d4
2018-11-19 15:18:32 -08:00
Andrea Marchesini a0e598311a Bug 1438945 - Part 7: SharedWorker can be intercepted by a ServiceWorker. r=asuth
--HG--
extra : rebase_source : 6b6f6790aded240ce94aefce35fcc915b40b98dd
2018-11-19 15:18:32 -08:00
Andrea Marchesini dbb1bf7e31 Bug 1438945 - Part 6: CSP via IPC. r=ckerschb
--HG--
extra : rebase_source : 8ea27a931619ec0bf75035039c9b4d66d23d7e70
2018-11-19 15:18:21 -08:00
Andrea Marchesini fd9ee3b364 Bug 1438945 - Part 5: SharedWorker browser test. r=asuth
--HG--
extra : rebase_source : 065a7528393499225a0da4206f22a7638c534bea
2018-11-19 15:18:21 -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
Andrea Marchesini 1bf562b370 Bug 1438945 - Part 2: PSharedWorker protocol. r=asuth
--HG--
extra : rebase_source : 1ec6d2c9fc8dcffb9aa4958d81784408090df534
2018-11-19 15:18:20 -08:00
Andrea Marchesini b0cbc4dcf9 Bug 1438945 - Part 1: Moving SharedWorker in a separate folder. r=asuth
--HG--
rename : dom/workers/SharedWorker.cpp => dom/workers/sharedworkers/SharedWorker.cpp
rename : dom/workers/SharedWorker.h => dom/workers/sharedworkers/SharedWorker.h
extra : rebase_source : a57218e0f428eb228c6d469f332872d51051cc43
2018-11-19 15:18:20 -08:00
Jeff Walden 7dd0d06d8c Bug 1485800 - Rename SourceBufferHolder to SourceText, and add a <typename Unit> template parameter to it so it can hold putative UTF-8 or UTF-16 source text. r=tcampbell, r=fitzgen
--HG--
rename : js/public/SourceBufferHolder.h => js/public/SourceText.h
extra : rebase_source : 34df669c2481eaccd6845f53c5ecf656b636f895
2018-11-08 18:42:48 -08:00
Jeff Walden f2196f8c8f Bug 1503086 - Initialize all SourceBufferHolders with a fallible function that in all cases assumes ownership of given-ownership data. r=tcampbell, r=bz, r=mrbkap on some finicky worker code lightly touched here
--HG--
extra : rebase_source : 94b1a13dc03a7f1a5d07a2c665fdc0cde162d411
2018-10-23 12:27:16 -07: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
Andrea Marchesini 7797a1a972 Bug 1387503 - FestStreamReader should cancel the reader when the worker shutdowns, r=jorendorff 2018-11-12 14:44:39 +01:00
Jason Orendorff 8a5616d1e2 Bug 1389628 - Part 2: Enable Streams API by default. r=baku,tcampbell
Depends on D8705

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

--HG--
extra : moz-landing-system : lando
2018-11-07 17:02:02 +00:00
Andrea Marchesini cdc6f5845f Bug 1504953 - SecurityError for unsupported scheme in Workers and SharedWorkers, r=smaug 2018-11-06 13:36:13 +01:00
Gerald Squelart 1d2a9c227e Bug 1503468 - Add more AUTO_PROFILER_THREAD_SLEEP's - r=mstange
These are around wait functions that already had an IDLE marker.

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

--HG--
extra : moz-landing-system : lando
2018-11-02 16:26:50 +00:00
Daniel Varga e86b1d05f8 Merge mozilla-inbound to mozilla-central. a=merge
--HG--
rename : mobile/android/chrome/geckoview/GeckoViewNavigationContent.js => mobile/android/chrome/geckoview/GeckoViewNavigationChild.js
2018-11-02 00:27:53 +02:00
Ryan Hunt 9cd3dc8521 Bug 1501196 - Ensure RuntimeService::Shutdown() is always called. r=baku a=reland
It's possible for RuntimeService to be created after 'xpcom-shutdown' has fired. In this case, it
will receive 'xpcom-shutdown-threads' and perform Cleanup() but not Shutdown(). This means that
mShuttingDown will not be set to 'true', but mIdleThreadTimer will be destroyed. This can cause
crashes if a NoteIdleThread callback runs after Cleanup(). This has been observed to happen in
xpcshell tests.

I think the easiest way to handle this is to manually call Shutdown() in Cleanup() when we
see that mShuttingDown == false. This means that Shutdown() might be called in GetOrCreateService()
if we fail to create the service, but it looks like the code can handle this.

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

--HG--
extra : source : e28fa79bc2f94ca3b72456b47353f2e2dda8da1a
extra : amend_source : f09508b5c62fb1fe4b5997f822b5d4e5f7ef8076
2018-10-30 11:51:12 -05:00
Margareta Eliza Balazs 39cb1e96cf Backed out changeset e28fa79bc2f9 (bug 1501196) for suspicion of causing Bug 1503757. a=backout 2018-11-01 11:22:11 +02:00
Ryan Hunt 76554e50cb Bug 1501196 - Ensure RuntimeService::Shutdown() is always called. r=baku
It's possible for RuntimeService to be created after 'xpcom-shutdown' has fired. In this case, it
will receive 'xpcom-shutdown-threads' and perform Cleanup() but not Shutdown(). This means that
mShuttingDown will not be set to 'true', but mIdleThreadTimer will be destroyed. This can cause
crashes if a NoteIdleThread callback runs after Cleanup(). This has been observed to happen in
xpcshell tests.

I think the easiest way to handle this is to manually call Shutdown() in Cleanup() when we
see that mShuttingDown == false. This means that Shutdown() might be called in GetOrCreateService()
if we fail to create the service, but it looks like the code can handle this.

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

--HG--
extra : rebase_source : 3c4a9cb76b81c4aef87b6373548e9da8ca64075e
extra : amend_source : d17d7a0e35e8bd9fcfbbd567e387d9af857bfd8a
2018-10-30 11:51:12 -05:00
Andrea Marchesini 223d7172bf Bug 1486698 - Update Fetch+Stream implementation to throw when the stream is disturbed or locked, r=bz
In this patch, I went through any place in DOM fetch code, where there are
ReadableStreams and update the locked, disturbed, readable checks.

Because we expose streams more often, we need an extra care in the use of
ErrorResult objects. JS streams can now throw exceptions and we need to handle
them.

This patch also fixes a bug in FileStreamReader::CloseAndRelease() which could
be called in case mReader creation fails.
2018-10-31 18:30:18 +01:00
Ciure Andrei a2c4dad0d5 Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2018-10-31 00:16:17 +02:00
Andrea Marchesini 263f4c6e8b Bug 1502599: XHR should allow just "GET" method for blob URLs, r=smaug 2018-10-30 22:07:32 +01:00
Ehsan Akhgari 8a4d8f4fa4 Bug 1501978 - Part 2: Remove the browser.contentblocking.enabled pref from the tests that set it to true needlessly r=baku
Depends on D10074

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

--HG--
extra : moz-landing-system : lando
2018-10-30 07:47:56 +00:00
Ehsan Akhgari 5fef8e924c Bug 1501978 - Part 1: Stop honouring the browser.contentblocking.enabled pref in Gecko r=baku
Differential Revision: https://phabricator.services.mozilla.com/D10074

--HG--
extra : moz-landing-system : lando
2018-10-30 14:30:15 +00:00
Gurzau Raul 08a80deaa6 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-10-30 00:04:59 +02:00
Perry Jiang 40e929d0df Bug 1354577 - require ServiceWorkerGlobalScope.importScripts() to only accept JavaScript MIME types r=edenchuang
- Make ServiceWorkerGlobalScope.importScripts() throw a NetworkError when receiving a
bad (i.e. non-JavaScript) MIME type
- Correct registration-tests-mime-types.js to expect TypeError when registering
a service worker that calls importScripts() with a bad MIME type, per spec
- Add WPT import-scripts-mime-types.https.html to test importScripts success/failure,
depending on MIME type

Depends on D6416

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

--HG--
extra : moz-landing-system : lando
2018-10-29 15:08:24 +00:00
Ehsan Akhgari 43f23459b2 Bug 1501286 - Part 4: Remove the browser.contentblocking.ui.enabled pref from several tests which now set it needlessly r=johannh
Depends on D9521

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

--HG--
extra : moz-landing-system : lando
2018-10-25 16:46:42 +00:00
Dorel Luca 9529a31c66 Backed out 5 changesets (bug 1501286) for browser-chrome failures in browser/components/uitour/test/browser_trackingProtection.js
Backed out changeset cac0d4aa79d1 (bug 1501286)
Backed out changeset 578d395f555e (bug 1501286)
Backed out changeset d9940451c373 (bug 1501286)
Backed out changeset ca6c3139bdd2 (bug 1501286)
Backed out changeset 93d6f4d54f78 (bug 1501286)

--HG--
extra : rebase_source : 04083c456cd0df6243861cf53e5c39c08888c5ad
2018-10-25 17:52:59 +03:00
Ehsan Akhgari 0cc932a863 Bug 1501286 - Part 4: Remove the browser.contentblocking.ui.enabled pref from several tests which now set it needlessly r=johannh
Depends on D9521

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

--HG--
extra : moz-landing-system : lando
2018-10-25 13:35:24 +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