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

407 Коммитов

Автор SHA1 Сообщение Дата
Cosmin Sabou fdf40d5a31 Backed out changeset 1778ca2ab291 (bug 1744425) for bc failures on browser_xpcom_graph_wait.js. CLOSED TREE 2021-12-08 07:20:54 +02:00
Chris Peterson aae95e46eb Bug 1744425 - Replace nsContentUtils::GenerateUUID() to nsID::GenerateUUID(). r=nika
Bug 1723674 added a new nsID::GenerateUUID() static factory function to generate UUIDs without the overhead of querying and instantiating an nsIUUIDGenerator object. nsContentUtils::GenerateUUID() is a utility function that amortizes that overhead by holding an nsIUUIDGenerator singleton. That's no longer necessary because code that calls nsContentUtils::GenerateUUID() can now just call nsID::GenerateUUID(). No nsIUUDGenerator is needed.

Differential Revision: https://phabricator.services.mozilla.com/D132866
2021-12-08 03:19:11 +00:00
Tim Huang e3e09e1fdf Bug 1731999 - Part 3: Enable partitioned service workers. r=pbz
This patch enables partitioned service workers in third-party contexts.
Doesn't like before, we will allow service workers to be registered even
the third-party contexts don't have storage access and the registered
service workers will be partitioned by the top-level site.

You can control this by using the pref 'privacy.partition.serviceWorkers'.
Setting this to true will enable the partitioning, otherwise, it will
still use the old behavior.

Differential Revision: https://phabricator.services.mozilla.com/D131788
2021-11-30 13:40:31 +00:00
Tim Huang bf00e6e2cf Bug 1731999 - Part 2: Use regular principal for service workers if pref 'privacy.partition.serviceWorkers' is false. r=pbz
Differential Revision: https://phabricator.services.mozilla.com/D131787
2021-11-30 13:40:31 +00:00
Tim Huang 2997f5f4a1 Bug 1731982 - Part 4: Using StoragePrincipalHelper::GetPrincipal() in ClientChannelHelper. r=asuth
To support foreign partitioned prinicpal for Client, we use
StoragePrincipalHelper::GetPrincipal() to get the foreign partitioned
principal from the channel in the ClientChannelHelper. And use it to
create client.

Differential Revision: https://phabricator.services.mozilla.com/D127631
2021-11-25 13:11:31 +00:00
Alexandru Michis 490a04115c Backed out 12 changesets (bug 1731982, bug 1736401) for causing crashes. a=backout
DONTBUILD

Backed out changeset ab85eef8a4fd (bug 1736401)
Backed out changeset 347ce2439936 (bug 1731982)
Backed out changeset fa0ff1505daa (bug 1731982)
Backed out changeset 5b1f2b0a5673 (bug 1731982)
Backed out changeset 4adc65d2f1a3 (bug 1731982)
Backed out changeset a8700204af07 (bug 1731982)
Backed out changeset 88bd00ed8d94 (bug 1731982)
Backed out changeset 80bd8c79b931 (bug 1731982)
Backed out changeset 58ca3a94fec0 (bug 1731982)
Backed out changeset 0b28570dea43 (bug 1731982)
Backed out changeset 23524ce67bb9 (bug 1731982)
Backed out changeset d29cc06a65db (bug 1731982)
2021-11-09 09:23:38 +02:00
Tim Huang a705097b44 Bug 1731982 - Part 4: Using StoragePrincipalHelper::GetPrincipal() in ClientChannelHelper. r=asuth
To support foreign partitioned prinicpal for Client, we use
StoragePrincipalHelper::GetPrincipal() to get the foreign partitioned
principal from the channel in the ClientChannelHelper. And use it to
create client.

Differential Revision: https://phabricator.services.mozilla.com/D127631
2021-11-08 14:30:54 +00:00
Sandor Molnar f7bfaba790 Backed out 2 changesets (bug 1731597) for causing multiple wpt failures. CLOSED TREE
Backed out changeset 48cc3daf8201 (bug 1731597)
Backed out changeset db878c07f32a (bug 1731597)
2021-10-29 05:32:59 +03:00
Nika Layzell 6a67c931b0 Bug 1731597 - Part 1: Generalize nsBrowsingContextReadyCallback, r=annyG
Differential Revision: https://phabricator.services.mozilla.com/D126993
2021-10-28 22:25:28 +00:00
Butkovits Atila 47821a8f76 Backed out 11 changesets (bug 1731982, bug 1736401) for causing crashes in mozilla::dom::ClientHandle::Control. a=backout
Backed out changeset 83176c86784c (bug 1736401)
Backed out changeset 4826707af5b3 (bug 1731982)
Backed out changeset a748e43fada0 (bug 1731982)
Backed out changeset 49302f7705a4 (bug 1731982)
Backed out changeset 59a5860fd74d (bug 1731982)
Backed out changeset 1f7ec5f62c7c (bug 1731982)
Backed out changeset 3142414872de (bug 1731982)
Backed out changeset 363ae2df245d (bug 1731982)
Backed out changeset ae319f8182ac (bug 1731982)
Backed out changeset 23edbfc8e84a (bug 1731982)
Backed out changeset 5f35364352f0 (bug 1731982)
2021-10-19 22:23:12 +03:00
Tim Huang 33102401a7 Bug 1731982 - Part 5: Using StoragePrincipalHelper::GetPrincipal() in ClientChannelHelper. r=asuth
To support foreign partitioned prinicpal for Client, we use
StoragePrincipalHelper::GetPrincipal() to get the foreign partitioned
principal from the channel in the ClientChannelHelper. And use it to
create client.

Differential Revision: https://phabricator.services.mozilla.com/D127631
2021-10-19 06:33:08 +00:00
Cosmin Sabou 49f2f21930 Backed out 10 changesets (bug 1731982) for causing OS X performance test failures and crashes (Bug 1736436). a=backout DONTBUILD
Backed out changeset 48e6f591f699 (bug 1731982)
Backed out changeset 77907884b2fa (bug 1731982)
Backed out changeset a299a2d43ebe (bug 1731982)
Backed out changeset 005801e7cf91 (bug 1731982)
Backed out changeset ef71b02c40cc (bug 1731982)
Backed out changeset a52dd02f2b3f (bug 1731982)
Backed out changeset 50b14ef1eb4a (bug 1731982)
Backed out changeset 80641bdceb6a (bug 1731982)
Backed out changeset ada9e2008ca4 (bug 1731982)
Backed out changeset a208016e9953 (bug 1731982)
2021-10-18 22:18:08 +03:00
Tim Huang 6c821cef51 Bug 1731982 - Part 5: Using StoragePrincipalHelper::GetPrincipal() in ClientChannelHelper. r=asuth
To support foreign partitioned prinicpal for Client, we use
StoragePrincipalHelper::GetPrincipal() to get the foreign partitioned
principal from the channel in the ClientChannelHelper. And use it to
create client.

Differential Revision: https://phabricator.services.mozilla.com/D127631
2021-10-18 12:20:32 +00:00
Cristian Tuns dd44cdf4ef Backed out 10 changesets (bug 1731982) for causing hybrid bustages on nsCORSListenerProxy.obj CLOSED TREE
Backed out changeset a248413c22ec (bug 1731982)
Backed out changeset 1bd7de5d93a1 (bug 1731982)
Backed out changeset d028e1ce1313 (bug 1731982)
Backed out changeset 7db7537bbc24 (bug 1731982)
Backed out changeset 28c18d83906d (bug 1731982)
Backed out changeset 6258b4e10406 (bug 1731982)
Backed out changeset 68bf86b1459c (bug 1731982)
Backed out changeset b8990af2fca2 (bug 1731982)
Backed out changeset 153783261021 (bug 1731982)
Backed out changeset bc9c3abbb8f8 (bug 1731982)
2021-10-15 18:12:21 -04:00
Tim Huang 8d683db77f Bug 1731982 - Part 5: Using StoragePrincipalHelper::GetPrincipal() in ClientChannelHelper. r=asuth
To support foreign partitioned prinicpal for Client, we use
StoragePrincipalHelper::GetPrincipal() to get the foreign partitioned
principal from the channel in the ClientChannelHelper. And use it to
create client.

Differential Revision: https://phabricator.services.mozilla.com/D127631
2021-10-15 20:00:03 +00:00
Cristian Tuns d3df74e295 Backed out 9 changesets (bug 1731982) for causing wpt failures on localStorage. CLOSED TREE
Backed out changeset bbeba8b14a2f (bug 1731982)
Backed out changeset 645cc214c608 (bug 1731982)
Backed out changeset 3a8e2f9c15e8 (bug 1731982)
Backed out changeset 208dd7c57311 (bug 1731982)
Backed out changeset 76a13a728f13 (bug 1731982)
Backed out changeset a6bfce877a86 (bug 1731982)
Backed out changeset 5fc4e33a8232 (bug 1731982)
Backed out changeset 353e3b3e020a (bug 1731982)
Backed out changeset b07167090923 (bug 1731982)
2021-10-13 10:47:25 -04:00
Tim Huang 21e775c7ac Bug 1731982 - Part 5: Using StoragePrincipalHelper::GetPrincipal() in ClientChannelHelper. r=asuth
To support foreign partitioned prinicpal for Client, we use
StoragePrincipalHelper::GetPrincipal() to get the foreign partitioned
principal from the channel in the ClientChannelHelper. And use it to
create client.

Differential Revision: https://phabricator.services.mozilla.com/D127631
2021-10-13 11:18:53 +00:00
Noemi Erli cb0b4097d6 Backed out 9 changesets (bug 1731982) for causing Bp-hybrid bustages CLOSED TREE
Backed out changeset 82bb76c2e531 (bug 1731982)
Backed out changeset 8240ef0e1771 (bug 1731982)
Backed out changeset f46f05792c6a (bug 1731982)
Backed out changeset 449c821bc56e (bug 1731982)
Backed out changeset cb813505b5a9 (bug 1731982)
Backed out changeset 06fad8cd9345 (bug 1731982)
Backed out changeset 4b8cf4756686 (bug 1731982)
Backed out changeset 5468bf77f732 (bug 1731982)
Backed out changeset 7800585e3d6a (bug 1731982)
2021-10-12 23:12:19 +03:00
Tim Huang c7c5eaebff Bug 1731982 - Part 5: Using StoragePrincipalHelper::GetPrincipal() in ClientChannelHelper. r=asuth
To support foreign partitioned prinicpal for Client, we use
StoragePrincipalHelper::GetPrincipal() to get the foreign partitioned
principal from the channel in the ClientChannelHelper. And use it to
create client.

Differential Revision: https://phabricator.services.mozilla.com/D127631
2021-10-12 18:55:19 +00:00
Tom Schuster 5d023856bb Bug 1722576 - Rename PostMessageOptions to StructuredSerializeOptions. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D126717
2021-09-29 12:48:17 +00:00
Sandor Molnar fe9f55e2fb Backed out 2 changesets (bug 1722576) for causing wpt failures in structured-clone.any.worker.html
Backed out changeset d31a1c199922 (bug 1722576)
Backed out changeset 4d0e3d6a1960 (bug 1722576)
2021-09-28 22:59:51 +03:00
Tom Schuster 6cec896db2 Bug 1722576 - Rename PostMessageOptions to StructuredSerializeOptions. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D126717
2021-09-28 17:09:18 +00:00
Eden Chuang 963f6a7e85 Bug 1730350 - Add comments to explains why !XRE_IsE10sParetnProcess() is needed in ClientManagerService. r=dom-worker-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D125518
2021-09-15 08:19:24 +00:00
Nika Layzell 8defd39d49 Bug 1729458 - Part 3: Clean up future client sources during shutdown, r=asuth
Depends on D124800

Differential Revision: https://phabricator.services.mozilla.com/D125248
2021-09-14 15:02:59 +00:00
Sandor Molnar 5f8d191513 Backed out 3 changesets (bug 1729458) for causing multiple dt failures. CLOSED TREE
Backed out changeset 16b385e15fad (bug 1729458)
Backed out changeset 72b7a9c7bf30 (bug 1729458)
Backed out changeset 704dd03288b1 (bug 1729458)
2021-09-13 21:08:44 +03:00
Nika Layzell 22b78993fe Bug 1729458 - Part 3: Clean up future client sources during shutdown, r=asuth
Depends on D124800

Differential Revision: https://phabricator.services.mozilla.com/D125248
2021-09-13 15:23:32 +00:00
Luca Greco 1c1c9277e6 Bug 1729123 - Run diagnostic assertion on cm->IsShutdown only if dom.workers.testing.enabled is true. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D124687
2021-09-06 19:36:25 +00:00
Luca Greco 052fc46425 Bug 1727405 - Add a diagnostic assert to check that ClientManager::GetOrCreateForCurrentThread is not returning a stale ClientManager instance that is already shutdown. r=asuth
While investigating an unexpected test failure triggered by a mochitest that was testing the identity WebExtensions API
(D121683 from Bug 1723852) I did notice that the actual underlying issue was triggered by a leak
(in particular the Extension API class in the initial draft of that D121683 patch was missing a RefPtr
in the NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE macro used for that class) but the issue was presenting
itself as an empty scriptURL in the ClientSource for the test case that was executed after the one that
triggered tha leak, and far enough from where it was actually triggered.

To make it easier to spot the issue nearer to the actual underlying issue, I think that it would be
reasonable to add a diagnostic assertion to ClientManager::GetOrCreateForCurrentThread that would
be triggered earlier if a leak was keeping the ClientManager instance alive in the idle DOM Worker
Thread.

Differential Revision: https://phabricator.services.mozilla.com/D123530
2021-09-02 21:24:58 +00:00
Alexandru Michis ce2aeb6bf8 Backed out changeset 9e8267a443e5 (bug 1727405) for causing telemetry failures in ClientManager.cpp
CLOSED TREE
2021-09-01 01:36:24 +03:00
Luca Greco 0062a37d58 Bug 1727405 - Add a diagnostic assert to check that ClientManager::GetOrCreateForCurrentThread is not returning a stale ClientManager instance that is already shutdown. r=asuth
While investigating an unexpected test failure triggered by a mochitest that was testing the identity WebExtensions API
(D121683 from Bug 1723852) I did notice that the actual underlying issue was triggered by a leak
(in particular the Extension API class in the initial draft of that D121683 patch was missing a RefPtr
in the NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE macro used for that class) but the issue was presenting
itself as an empty scriptURL in the ClientSource for the test case that was executed after the one that
triggered tha leak, and far enough from where it was actually triggered.

To make it easier to spot the issue nearer to the actual underlying issue, I think that it would be
reasonable to add a diagnostic assertion to ClientManager::GetOrCreateForCurrentThread that would
be triggered earlier if a leak was keeping the ClientManager instance alive in the idle DOM Worker
Thread.

Differential Revision: https://phabricator.services.mozilla.com/D123530
2021-08-31 14:18:35 +00:00
Kagami Sascha Rosylight eddf271c1f Bug 1726648 - Add a helper to trim brackets from nsID r=mccr8,smaug
Differential Revision: https://phabricator.services.mozilla.com/D123163
2021-08-23 10:54:11 +00:00
Iulian Moraru a16afaadfe Backed out changeset d21b3f88a2b4 (bug 1726648) for causing build bustages. CLOSED TREE 2021-08-23 04:12:02 +03:00
Kagami Sascha Rosylight 0c5086660f Bug 1726648 - Add a helper to trim brackets from nsID r=mccr8,smaug
Differential Revision: https://phabricator.services.mozilla.com/D123163
2021-08-23 00:35:40 +00:00
Kagami Sascha Rosylight d97053ccff Bug 1723050 - Part 7: Replace typedef by using in dom/clients/ r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D121299
2021-08-06 17:26:49 +00:00
Andrew Sutherland 6736ecda3b Bug 1503072 - Add mitigation to bypass SW on navigation fault. r=dom-worker-reviewers,necko-reviewers,valentin,edenchuang
We enable this mitigation by default because:
- The alternate UX is about:blank or corrupted content.  That's never good.
- We want to make sure that our test coverage handles this mitigation because
  it's want we want to ship.

However, we do explicitly disable it for all ServiceWorker WPT's via
`__dir__.ini` directive at the root of the service-workers test tree.

This is motivated by the
`/service-workers/service-worker/update-recovery.https.html` test which
intentionally tests a broken ServiceWorker being able to be updated.  It
explicitly tests that the intercepted broken iframe shouldn't successfully
load, but our mitigation makes it load, which breaks the test.

Depends on D111845

Differential Revision: https://phabricator.services.mozilla.com/D111993
2021-07-12 21:10:26 +00:00
Iulian Moraru ef7b6b88df Backed out 3 changesets (bug 1503072) for causing bc failures on browser_navigation_fetch_fault_handling.js. CLOSED TREE
Backed out changeset f8c6503512f5 (bug 1503072)
Backed out changeset c04927c15fd8 (bug 1503072)
Backed out changeset b7550232d4f1 (bug 1503072)
2021-07-12 15:19:09 +03:00
Andrew Sutherland bd86df06b4 Bug 1503072 - Add mitigation to bypass SW on navigation fault. r=dom-worker-reviewers,necko-reviewers,valentin,edenchuang
We enable this mitigation by default because:
- The alternate UX is about:blank or corrupted content.  That's never good.
- We want to make sure that our test coverage handles this mitigation because
  it's want we want to ship.

However, we do explicitly disable it for all ServiceWorker WPT's via
`__dir__.ini` directive at the root of the service-workers test tree.

This is motivated by the
`/service-workers/service-worker/update-recovery.https.html` test which
intentionally tests a broken ServiceWorker being able to be updated.  It
explicitly tests that the intercepted broken iframe shouldn't successfully
load, but our mitigation makes it load, which breaks the test.

Depends on D111845

Differential Revision: https://phabricator.services.mozilla.com/D111993
2021-07-12 11:13:35 +00:00
Nika Layzell 1aaeb179e2 Bug 1715144 - Part 1: Stop adding /ipc/glue to LOCAL_INCLUDES when including chromium-config.mozbuild, r=ipc-reviewers,necko-reviewers,mccr8,valentin
Differential Revision: https://phabricator.services.mozilla.com/D117103
2021-06-09 04:56:48 +00:00
Eden Chuang 0447732333 Bug 1584007 - check ClientSource existence r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D85362
2021-05-24 13:55:08 +00:00
Eden Chuang e1283fcd46 Bug 1584007 - FutureClientSourceParent should keep ClientManagerService alive r=asuth
The strong reference will be dropped when FutureClientSourceParent is removed,
and we guarantee that all FutureClientSourceParents will either be removed or
replaced with a ClientSourceParent (or at least this is a guarantee that's
supposed to be true).

Differential Revision: https://phabricator.services.mozilla.com/D68041
2021-05-24 13:55:07 +00:00
Eden Chuang 3e3456e73e Bug 1584007 - let ClientChannelHelperParent manage FutureClientSourceParent lifetime r=dom-workers-and-storage-reviewers,mattwoodrow,asuth
ClientChannelHelperParent is the thing creating the ClientInfos which aren't
backed by existing ClientSources, so it may make sense for CCHP to tell the
ClientManagerService (CMS) to "expect" or "forget" a "future"
ClientSource(Parent).

When such a ClientInfo is created, CCHP notifies the CMS that a future
ClientSource may be created. This notification has to be observed before any
ClientHandles try to query CMS to a ClientSourceParent, which is the case
because the notification as well as ClientHandleParent constructors occur over
PBackground, and the notification sending method is called first.

CMS is told to forget the future ClientSource whenever a redirect occurs that
would result in the creation of a new ClientSource (i.e. a new ClientInfo). It's
also possible that the ClientInfo's LoadInfo's channel is cancelled. To account
for this, CHCP stores the most recent ClientInfo it's created and tells CMS
to _possibly_ forget the associated future ClientSource in its destructor. It's
possible that the channel completed its load, in which case this notification
is a no-op. This also relies on CHCP being destroyed after the reserved
ClientSource has a chance to both be created and register its
ClientSourceParent.

Differential Revision: https://phabricator.services.mozilla.com/D66529
2021-05-24 13:55:07 +00:00
Eden Chuang 9ca5730156 Bug 1584007 - allow ClientManager to register "future" ClientSources r=dom-workers-and-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D66520
2021-05-24 13:55:06 +00:00
Eden Chuang 2ed195d384 Bug 1584007 - let ClientHandleParents wait on FutureClientSourceParents r=dom-workers-and-storage-reviewers,mattwoodrow,asuth
Differential Revision: https://phabricator.services.mozilla.com/D66154
2021-05-24 13:55:06 +00:00
Eden Chuang 883943e462 Bug 1584007 - let ClientManagerService store FutureClientSourceParent r=dom-workers-and-storage-reviewers,mattwoodrow,asuth
The changes only make it possible for ClientManagerService to store
FutureClientSourceParents, but it will not actually store them until
following changesets.

Differential Revision: https://phabricator.services.mozilla.com/D66145
2021-05-24 13:55:06 +00:00
Eden Chuang e48c6ff8ce Bug 1584007 - initial implementation of FutureClientSourceParent r=dom-workers-and-storage-reviewers,mattwoodrow,asuth
Also implements SourceTableEntry and nsIDHasher to switch ClientManagerService's
nsDataHashTable to a mozilla::HashMap<nsID, SourceTableEntry> in following
changesets.

Differential Revision: https://phabricator.services.mozilla.com/D66144
2021-05-24 13:55:05 +00:00
Emilio Cobos Álvarez 5e03d6a488 Bug 1704651 - Wait for the right load in ClientOpenWindow. r=asuth
With fission+BFCache, we get a notification for the initial document,
and that fails the same-origin check (because about:blank isn't
same-origin with the opener) so we resolve the promise with null
rather than returning a client.

Instead, wait for the right load to arrive if the top level window
global is the initial document.

Differential Revision: https://phabricator.services.mozilla.com/D112072
2021-04-16 23:38:42 +00:00
Butkovits Atila a8051422a4 Backed out changeset b099dbba4587 (bug 1704651) for causing leackcheck failures. CLOSED TREE 2021-04-15 18:49:25 +03:00
Emilio Cobos Álvarez 0677a9ec85 Bug 1704651 - Wait for the right load in ClientOpenWindow. r=asuth
With fission+BFCache, we get a notification for the initial document,
and that fails the same-origin check (because about:blank isn't
same-origin with the opener) so we resolve the promise with null
rather than returning a client.

Instead, wait for the right load to arrive if the top level window
global is the initial document.

Differential Revision: https://phabricator.services.mozilla.com/D112072
2021-04-15 12:11:02 +00:00
Nika Layzell 27ff2d45df Bug 1697927 - Part 1: Only expose HadOriginalOpener on BrowsingContext, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D108860
2021-03-18 16:15:17 +00:00
Simon Giesecke b9621d6376 Bug 1695162 - Use range-based for instead of custom hashtable iterators. r=xpcom-reviewers,kmag
Differential Revision: https://phabricator.services.mozilla.com/D108585
2021-03-17 15:49:46 +00:00