Commit Graph

633 Commits

Author SHA1 Message Date
Bogdan Tara
80377e90ee Backed out 6 changesets (bug 1552176) for causing Hazard bustages CLOSED TREE
Backed out changeset c79b90bae420 (bug 1552176)
Backed out changeset 4b970cc771ca (bug 1552176)
Backed out changeset de7aa0eaf4c8 (bug 1552176)
Backed out changeset c8e692a40cd3 (bug 1552176)
Backed out changeset 68882d1eccac (bug 1552176)
Backed out changeset 692e5e51e19e (bug 1552176)
2019-11-11 12:11:36 +02:00
Valentin Gosu
4fe6130ec3 Bug 1552176 - Add nsIRequest.set/getTRRMode r=dragana
* Makes it possible to selectively enable TRR for pbmode/container/window/etc

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

--HG--
extra : moz-landing-system : lando
2019-11-10 17:11:41 +00:00
Perry Jiang
cdf120ce01 Bug 1587960 - Replace StreamListenerParent's channel on internal redirects r=asuth,mattwoodrow,kmag
Differential Revision: https://phabricator.services.mozilla.com/D52101

--HG--
extra : moz-landing-system : lando
2019-11-07 23:56:47 +00:00
Brian Hackett
3b48883f4b Bug 1563607 Part 1 - Service worker check evaluation runnable should be a debuggee runnable, r=asuth.
Differential Revision: https://phabricator.services.mozilla.com/D47541

--HG--
extra : source : 33e9b3eecd98dd808a50a21204cff4f954333cad
2019-11-06 18:26:17 +00:00
Coroiu Cristina
086fc4d815 Backed out 4 changesets (bug 1563607) for causing hunks failed when backout Bug 1592616 on a CLOSED TREE
Backed out changeset edd1135fd507 (bug 1563607)
Backed out changeset ee2bb2d15659 (bug 1563607)
Backed out changeset 6d02ecfce856 (bug 1563607)
Backed out changeset 33e9b3eecd98 (bug 1563607)
2019-11-06 22:56:02 +02:00
Brian Hackett
3189d446a2 Bug 1563607 Part 1 - Service worker check evaluation runnable should be a debuggee runnable, r=asuth.
Differential Revision: https://phabricator.services.mozilla.com/D47541

--HG--
extra : moz-landing-system : lando
2019-11-06 18:26:17 +00:00
Coroiu Cristina
b78c37e290 Backed out 4 changesets (bug 1563607) for debugger failures on a CLOSED TREE
Backed out changeset c8f4de2596bc (bug 1563607)
Backed out changeset 1dc694b39efa (bug 1563607)
Backed out changeset cec07747fb2a (bug 1563607)
Backed out changeset a0d9b36ac4fe (bug 1563607)
2019-11-06 20:20:36 +02:00
Brian Hackett
ecf818817c Bug 1563607 Part 1 - Service worker check evaluation runnable should be a debuggee runnable, r=asuth.
Differential Revision: https://phabricator.services.mozilla.com/D47541

--HG--
extra : moz-landing-system : lando
2019-09-29 08:13:31 +00:00
Ehsan Akhgari
03fa12d685 Bug 1593162 - Remove the expired telemetry probes added in bug 1127552; r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D51335

--HG--
extra : moz-landing-system : lando
2019-11-01 13:43:15 +00:00
Perry Jiang
8ae16063a4 Bug 1592699 - Fix test_serviceworker_lifetime.html r=asuth
- Reset idle timeout when dispatching service worker operations even if the
worker is alive.
- Use MessageEvent instead of FetchEvent to avoid creating objects that leak
when the test finishes.

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

--HG--
extra : moz-landing-system : lando
2019-10-30 17:23:53 +00:00
Perry Jiang
58a1a3d132 Bug 1591101 - bookkeep orphaned registrations r=asuth
Keeping track of these registrations is needed for when
ServiceWorkerManager::MaybeStartShutdown is called for the first time. At this
point, all living service workers must register themselves with the
ServiceWorkerShutdownBlocker. Non-idle registrations that are unregistered and
not controlling clients would otherwise not be found in the SWM's data.

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

--HG--
extra : moz-landing-system : lando
2019-10-30 17:12:10 +00:00
Kashav Madan
a19f86daf7 Bug 1578465 - Update fission annotations, r=kmag
Depends on D49003

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

--HG--
extra : moz-landing-system : lando
2019-10-29 16:23:35 +00:00
Boris Zbarsky
033a03eb89 Bug 1591491. Add more use of FakeString::ShareOrDependUpon. r=froydnj
If someone then saves the resulting string, this will let us avoid a copy.

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

--HG--
extra : moz-landing-system : lando
2019-10-28 20:41:59 +00:00
Gurzau Raul
c40f10546e Backed out 6 changesets (bug 1578465) for mochitest leakcheck failures on a CLOSED TREE.
Backed out changeset 46073b8c1da9 (bug 1578465)
Backed out changeset bd41e1217534 (bug 1578465)
Backed out changeset 38a4c02bc815 (bug 1578465)
Backed out changeset a3857bf2b069 (bug 1578465)
Backed out changeset ca658e02223d (bug 1578465)
Backed out changeset 4420f02e5c3a (bug 1578465)
2019-10-25 02:02:07 +03:00
Eden Chuang
23964d1f55 Bug 1581477 - Enable dom/serviceworkers/test mochitests for fission r=perry
After sw-e10s enabled in nightly, following tests should be passsed with Fission

dom/serviceworkers/test/browser_devtools_serviceworker_interception.js
dom/serviceworkers/test/test_cookie_fetch.html
dom/serviceworkers/test/test_csp_upgrade-insecure_intercept.html
dom/serviceworkers/test/test_eventsource_intercept.html
dom/serviceworkers/test/test_hsts_upgrade_intercept.html
dom/serviceworkers/test/test_https_fetch.html
dom/serviceworkers/test/test_https_fetch_cloned_response.html
dom/serviceworkers/test/test_https_origin_after_redirect.html
dom/serviceworkers/test/test_https_origin_after_redirect_cached.html
dom/serviceworkers/test/test_https_synth_fetch_from_cached_sw.html
dom/serviceworkers/test/test_importscript_mixedcontent.html
dom/serviceworkers/test/test_sanitize_domain.html

This patch enables these tests.

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

--HG--
extra : moz-landing-system : lando
2019-10-22 14:56:01 +00:00
Boris Zbarsky
a0b4a1fee2 Bug 1582892. Expose the number of strings in a Web IDL enum in a nice way. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D49536

--HG--
extra : moz-landing-system : lando
2019-10-23 03:54:39 +00:00
Daniel Varga
ae5334abca Backed out changeset f9a4c8d67be3 (bug 1582892) for build bustage at build/src/dom/console/ConsoleInstance. On a CLOSED TREE 2019-10-23 06:13:54 +03:00
Boris Zbarsky
e09da7b0c7 Bug 1582892. Expose the number of strings in a Web IDL enum in a nice way. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D49536

--HG--
extra : moz-landing-system : lando
2019-10-18 03:26:43 +00:00
Boris Zbarsky
0cbc6daf1f Bug 1589285 part 3. Use the new GetString methods for Web IDL enums in various places. r=edgar
The idea is to stop directly accessing EnumTypeValues::strings in type-unsafe
ways from consumer code.

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

--HG--
extra : moz-landing-system : lando
2019-10-17 23:40:57 +00:00
Kashav Madan
e063bb080d Bug 1578465 - Update fission annotations, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D49005

--HG--
extra : moz-landing-system : lando
2019-10-22 20:46:00 +00:00
Andrew Sutherland
4945715675 Bug 1589708 - Restore propagateUnregister as API to wipe registrations. r=perry
Owing to a lack of test coverage, the changes in bug 1469048 regressed our
de facto privacy/devtools API at nsIServiceWorkerManager.propagateUnregister
to no longer wipe the given registration.  The intent of that bug's changes
was to stop the now-moot propagation, but that particular intentional mis-use
of the API was missed.

This patch fixes the problem but maintains the parent-intercept behavior of
only calling ServiceWorkerRegistrar::UnregisterServiceWorker only once.

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

--HG--
extra : moz-landing-system : lando
2019-10-22 01:48:37 +00:00
Sylvestre Ledru
7c309095ea Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
Please note that it is the first reformat with clang-format 9
I only saw a fix in the .mm file

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-10-21 14:13:44 +00:00
Andrea Marchesini
6797e45278 Bug 1585284 - Use nsIGlobalObject in any Blob/File CTOR, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D49392

--HG--
extra : moz-landing-system : lando
2019-10-21 05:33:33 +00:00
Andrew Sutherland
9bd4571a16 Bug 1587447 - Make isParentInterceptEnabled an arg for spawned child-intercept version. r=perry
Differential Revision: https://phabricator.services.mozilla.com/D49803

--HG--
extra : moz-landing-system : lando
2019-10-18 22:08:05 +00:00
Geoff Brown
32490358c2 Bug 1585119 - Re-enable many more mochitests on Android; r=geckoview-reviewers,snorp
Most of these tests have been disabled for a long time; they run well
in the current test environment.
I intend to enable still more mochitests in a future patch.

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

--HG--
extra : moz-landing-system : lando
2019-10-18 14:35:20 +00:00
Eden Chuang
8e9a848cef Bug 1561706 - Update the controlled client in ServiceWorkerManager after process switching r=asuth,valentin,perry
When Fission is on, loading a cross-origin iframe triggers process switching when calling the channel::OnStartReqeust.
If a ServiceWorker should intercept the loading, the interception setting is completed while opening the channel.
That means the service worker controls the ClientSource created by the old process.
After process switching completed, the new ClientSource will be created and resume the loading from the opened channel.
However, in the original code, we did not update the controlled Client in the ServiceWorkerManager.
And when loading the same origin subresource in the new process, it makes ServiceWorkerManager cannot find the correct ServiceWorker to perform the interception.

Since we are going to release sw-e10s, this patch is only for both Fission and sw-e10s are on.

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

--HG--
extra : moz-landing-system : lando
2019-10-17 21:42:30 +00:00
Andrew Sutherland
cb0f2f4a10 Bug 1587794 - Do not assume global exists. r=perry
This is effectively a reversion of the change made in
https://hg.mozilla.org/mozilla-central/rev/89c938649297#l1.39 when
DOMMozPromiseRequestHolder was introduced.  I've tried to add some
comments to contextualize what's happening there and why it differs
from other similar callsites.

Longer term we might move to just deleting the underlying actor when
we are disconnected.  Those actors were written assuming an
execution model where letting either end delete the actor would result
in intentional process crashes when a message was received for a
destroyed actor.  That is no longer the case.

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

--HG--
extra : moz-landing-system : lando
2019-10-17 22:52:35 +00:00
Perry Jiang
c0d0830d63 Bug 1578919 - Don't allow AutoIPCStream to outlive its IPCStream r=asuth
In ServiceWorkerPrivateImpl::SendFetchEvent, a heap-allocated AutoIPCStream can
point to a stack-allocated IPCStream (part of an IPCInternalRequest). If this
IPCStream is destroyed before the AutoIPCStream, the AutoIPCStream will have a
dangling pointer (and this is the case if SendFetchEvent is called when the
Service Worker's state is "activating" rather than "activated").

This patch moves around the logic to handle the AutoIPCStream's lifetime to
ensure it its lifetime is within its IPCStream's lifetime. The larger issue
might be that AutoIPCStream doesn't have inherent lifetime guarantees (it'll
definitely outlive its IPCStream if it points to its embedded one, but it
doesn't own any external IPCStreams it might point to).

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

--HG--
extra : moz-landing-system : lando
2019-10-11 23:22:31 +00:00
Ehsan Akhgari
ff268df84b Bug 1546112 - Remove the code for XMLDocument.load/async; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D48877

--HG--
extra : moz-landing-system : lando
2019-10-10 18:20:34 +00:00
Perry Jiang
7019a28bcf Bug 1456995 - reduce access levels for member variables/methods in ServiceWorkerManager r=asuth
The changes are just cleanup for member variables/methods that should
be private to ServiceWorkerManager.

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

--HG--
extra : moz-landing-system : lando
2019-10-08 23:48:01 +00:00
Perry Jiang
b3b727b8ee Bug 1456995 - shutdown unregistered Service Workers on browser shutdown r=asuth
Also replace ServiceWorkerManager shutdown logic's normal for-loops with
range-based for-loops.

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

--HG--
extra : moz-landing-system : lando
2019-10-08 23:47:57 +00:00
Perry Jiang
2f362be636 Bug 1456995 - make browser_devtools_serviceworker_interception.js compatible with parent-intercept r=asuth
- Listen for observer topics in the parent-process when in parent intercept mode
- Remove an extra postMessage call (and the corresponding message handler)

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

--HG--
extra : moz-landing-system : lando
2019-10-08 23:47:26 +00:00
Perry Jiang
87c3eb5a96 Bug 1575185 - Subscribe content processes spawning Service Workers to permission updates r=asuth
Previously, Service Workers could spawn in a process that isn't subscribed
to permission updates, which could happen if that process hadn't loaded any
same-origin documents. To address this, parent-process logic for spawning
Service Workers would snapshot the permissions state to be sent to a content
process.

Unfortunately, this approach could lead to outdated, unsynchronized permissions.
Note that nsIPermissionManager::SetPermissionsWithKey is only used to initialize
permissions for a given key and is a no-op if already called with the same key
in a given process. As a result, the following sequence of events could happen:

Assume a content process CP that isn't subscribed to permission changes for an
origin A:

1) Parent process decides to spawn an origin A Service Worker in CP,
snapshotting a value V for permission P.
2) The Service Worker is spawned in CP, setting CP's permission manager's
permission P to value V (for origin A).
3) Parent process updates its permission P to a value A', which is not
broadcasted to CP (because it's not subscribed).
4) By now, the initial Service Worker has been terminated, and the parent
process decides once again to spawn an origin A Service Worker in CP.
5) The Service Worker is spawned in CP, but the call to SetPermissionsWithKey
is a no-op, leaving CP1 with a mismatched value for permission P.

An additional scenario is if the parent process updates a permission during a
remote Service Worker's lifetime.

This patch, which would subscribe CP1 to permission updates when the parent
process knows a Service Worker would be spawned in CP1, prevents these problems.

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

--HG--
extra : moz-landing-system : lando
2019-10-09 02:23:41 +00:00
Daniel Varga
1a37376531 Backed out 6 changesets (bug 1456995) for devtools failure at browser/browser_aboutdebugging_serviceworker_timeout.js. On a CLOSED TREE
Backed out changeset 2237ceb903a4 (bug 1456995)
Backed out changeset 5ce169fa82fb (bug 1456995)
Backed out changeset e64553b959f9 (bug 1456995)
Backed out changeset 7c53d7ca5ef7 (bug 1456995)
Backed out changeset 67e23c511201 (bug 1456995)
Backed out changeset e127b732bab0 (bug 1456995)
2019-10-05 01:58:08 +03:00
Perry Jiang
c4528c3537 Bug 1456995 - reduce access levels for member variables/methods in ServiceWorkerManager r=asuth
The changes are just cleanup for member variables/methods that should
be private to ServiceWorkerManager.

Depends on D48179

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

--HG--
extra : moz-landing-system : lando
2019-10-04 15:28:35 +00:00
Perry Jiang
ec209ccb5c Bug 1456995 - shutdown unregistered Service Workers on browser shutdown r=asuth
Also replace ServiceWorkerManager shutdown logic's normal for-loops with
range-based for-loops.

Depends on D43170

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

--HG--
extra : moz-landing-system : lando
2019-10-04 15:28:35 +00:00
Perry Jiang
1c644236c6 Bug 1456995 - make browser_devtools_serviceworker_interception.js compatible with parent-intercept r=asuth
- Listen for observer topics in the parent-process when in parent intercept mode
- Remove an extra postMessage call (and the corresponding message handler)

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

--HG--
extra : moz-landing-system : lando
2019-10-04 13:16:28 +00:00
Perry Jiang
5b28c5606d Bug 1581187 - only shutdown remote Service Workers on browser shutdown r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D48044

--HG--
extra : moz-landing-system : lando
2019-10-03 09:58:46 +00:00
Geoff Brown
9726503ed6 Bug 1584471 - Skip test_sanitize_domain.html on fission; r=mccr8
Skip frequently crashing test on fission (it was already marked as failing).

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

--HG--
extra : moz-landing-system : lando
2019-09-30 22:40:35 +00:00
Andrew McCreight
663c40c506 Bug 1579835, part 1b - Directly pass in remote type to E10SUtils.isWebRemoteType. r=mconley
Now that we only use a single field of the browser that gets passed in
to isWebRemoteType, I think it makes more sense to just pass in the
remote type directly.

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

--HG--
extra : moz-landing-system : lando
2019-09-26 22:16:28 +00:00
Anny Gakhokidze
f1c694e18f Bug 1582531 - Update fission annotations for skipped tests that are now passing succesfully, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D47347

--HG--
extra : moz-landing-system : lando
2019-09-27 14:25:10 +00:00
Tom Tung
699c7a419a Bug 1562663 - P3 - Have agent cluster Ids for workers; r=perry,nika
Dedicated workers should be in the same  agent cluster with its parent/creator.
The other workers (ShareWorker/ServiceWorker/ChromeWorker) create another agent
cluster when they are created from the creator.

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

--HG--
extra : moz-landing-system : lando
2019-09-23 09:57:23 +00:00
Boris Zbarsky
d0ce4c7209 Bug 1581315 part 3. Add MOZ_MUST_RETURN_FROM_CALLER_IF_THIS_IS_ARG to more ErrorResult methods. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D46107

--HG--
extra : moz-landing-system : lando
2019-09-20 02:19:18 +00:00
Andreea Pavel
3e284ad20a Bug 1578337 - disable test browser_storage_permission on all platforms r=egao
Differential Revision: https://phabricator.services.mozilla.com/D45477

--HG--
extra : moz-landing-system : lando
2019-09-21 07:08:39 +00:00
Eden Chuang
d6b2ea7588 Bug 1582125 - disable failed tests for fission r=perry
Disable failed tests for fission

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

--HG--
extra : moz-landing-system : lando
2019-09-18 22:35:22 +00:00
Eden Chuang
fd5c8abedb Bug 1581072 - Removing skip-if = fission for testing fission r=perry
ServiceWorker mochitests fail for Fission is fixed by bug 1542415.
Remove the skip-if for tests

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

--HG--
extra : moz-landing-system : lando
2019-09-16 21:11:57 +00:00
Andreea Pavel
3756361b00 Backed out changeset c47f550abd3e (bug 1578337) for failing bc at browser_bug629172.js on a CLOSED TREE 2019-09-13 14:59:14 +03:00
Andreea Pavel
8d63d04d42 Bug 1578337 - disable test browser_storage_permission on all platforms r=egao
Differential Revision: https://phabricator.services.mozilla.com/D45477

--HG--
extra : moz-landing-system : lando
2019-09-11 05:50:28 +00:00
Boris Zbarsky
14c30e58d6 Bug 1578173 part 4. Switch event subclasses to constructor operations. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D45391

--HG--
extra : moz-landing-system : lando
2019-09-11 14:35:28 +00:00
Cosmin Sabou
0a933b1510 Bug 1578325 - Disable test_async_waituntil.html for frequent failures. r=egao
Differential Revision: https://phabricator.services.mozilla.com/D44974

--HG--
extra : moz-landing-system : lando
2019-09-06 09:40:53 +00:00