Commit Graph

621 Commits

Author SHA1 Message Date
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
James Willcox
ea5c701029 Bug 1343678 - Enable web push pref for GeckoView r=geckoview-reviewers,droeh,smaug,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D41288

--HG--
extra : moz-landing-system : lando
2019-09-05 13:59:32 +00:00
Gijs Kruitbosch
9f3a3e9669 Bug 1578709 - Only set flash only pref for those tests that need it, r=mconley,ahal
Differential Revision: https://phabricator.services.mozilla.com/D44648

--HG--
extra : moz-landing-system : lando
2019-09-04 22:12:39 +00:00
Gurzau Raul
f96e9cd73f Backed out changeset 887d125d7f59 (bug 1578709) for failing at test_bug427744.html on a CLOSED TREE. 2019-09-04 21:34:11 +03:00
Gijs Kruitbosch
bb899238e7 Bug 1578709 - Only set flash only pref for those tests that need it, r=mconley,ahal
Differential Revision: https://phabricator.services.mozilla.com/D44648

--HG--
extra : moz-landing-system : lando
2019-09-04 17:28:02 +00:00
Cosmin Sabou
d6435fae32 Backed out 4 changesets (bug 1456995) for OSX mochitest failures on test_serviceworkerinfo.xul. CLOSED TREE
Backed out changeset e4deba1aa285 (bug 1456995)
Backed out changeset 03db4932e3ca (bug 1456995)
Backed out changeset 962b6affd688 (bug 1456995)
Backed out changeset 5fbed7d37ac0 (bug 1456995)
2019-09-03 22:27:03 +03:00
Perry Jiang
a1ec5b43d3 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-09-03 17:44:22 +00:00
Mark Banner
acd70816c6 Bug 1577746 - Enable ESLint rule dot-notation for dom/. r=baku
Depends on D44149

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

--HG--
extra : moz-landing-system : lando
2019-09-02 11:23:05 +00:00
Mark Banner
351d147e2f Bug 1577746 - Enable ESLint rule object-shorthand for dom/. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D44149

--HG--
extra : moz-landing-system : lando
2019-09-02 11:22:27 +00:00
Noemi Erli
478b1751c7 Backed out 5 changesets (bug 1343678) for causing multiple web-platform failures CLOSED TREE
Backed out changeset 4b77646bc788 (bug 1343678)
Backed out changeset 7396789341b1 (bug 1343678)
Backed out changeset 85526faefe6d (bug 1343678)
Backed out changeset 07b757a21222 (bug 1343678)
Backed out changeset 3551cc55620d (bug 1343678)
2019-08-30 00:36:40 +03:00
James Willcox
7586331427 Bug 1343678 - Enable web push pref for GeckoView r=geckoview-reviewers,droeh,smaug
Differential Revision: https://phabricator.services.mozilla.com/D41288

--HG--
extra : moz-landing-system : lando
2019-08-29 18:59:28 +00:00
Dorel Luca
547786f1cd Backed out 3 changesets (bug 1343678) for WPT failures on Android. CLOSED TREE
Backed out changeset 619e7838ebfd (bug 1343678)
Backed out changeset 5010684cdca4 (bug 1343678)
Backed out changeset b01343e4c2eb (bug 1343678)
2019-08-28 23:09:08 +03:00
James Willcox
3c29fb1982 Bug 1343678 - Enable web push pref for GeckoView r=geckoview-reviewers,droeh,smaug
Differential Revision: https://phabricator.services.mozilla.com/D41288

--HG--
extra : moz-landing-system : lando
2019-08-28 16:06:39 +00:00