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

309 Коммитов

Автор SHA1 Сообщение Дата
Bogdan Tara d68a202c49 Backed out 9 changesets (bug 1638711) for test_block_toplevel_data_navigation.html failures CLOSED TREE
Backed out changeset b137e5dfcc57 (bug 1638711)
Backed out changeset 3529cf4e69b6 (bug 1638711)
Backed out changeset 417df721766f (bug 1638711)
Backed out changeset 5b312893e8e2 (bug 1638711)
Backed out changeset d6d396498f5e (bug 1638711)
Backed out changeset 77f6f2396343 (bug 1638711)
Backed out changeset c1d12e04bc27 (bug 1638711)
Backed out changeset 6e702b519ef0 (bug 1638711)
Backed out changeset 9e5a049b57ed (bug 1638711)
2020-06-08 12:36:09 +03:00
Matt Woodrow 73198a7be9 Bug 1638711 - Mark WPTs that incorrectly expect synchronous security checks as failing. r=asuth
Depends on D77954

Differential Revision: https://phabricator.services.mozilla.com/D77955
2020-06-03 21:39:54 +00:00
Tim Huang fc35bb8338 Bug 1643051 - Change the dignostic assertion to regular assertion for the ClientSource.cpp. r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D78264
2020-06-04 12:56:51 +00:00
Tim Huang 77f24ad67a Bug 1641153 - Part 3: Revert the assertion back to diagnostic assertion in ClientSource.cpp r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D77076
2020-05-28 11:39:39 +00:00
Anny Gakhokidze 28243d5736 Bug 1630323 - Do not override user preferences when clicking on a service worker notification to open a new document, r=Gijs,nika,geckoview-reviewers,snorp
In Bug 1622749 a user preference for where to open new documents (from a
service worker notification) was temporarily overriden in order to quickly fix
a crash that was happening in mozilla::dom::ClientOpenWindow. The crash was
ocurring when the pref "browser.link.open_newwindow" was set to 2, meaning new
documents are opened in a new window, instead of a new tab. The reason the
browser crashed is because the path for opening a new document is different
depending on the current user setting, and in NEWWINDOW case we did not get a
browsing context returned when calling mozilla::dom::OpenWindow which resulted
in a failed assertion.

The solution is to pass in a callback to mozilla::dom::OpenWindow as part of
nsOpenWindowInfo object, and invoke that callback with a corresponding
BrowsingContext in nsFrameLoader when that browsing context is ready.

After we call mozilla::dom::OpenWindow, we wait on a promise, that will be
resolved when the callback is invoked, before executing the rest of the code
that depends on the browsing context for a newly opened document being
available.

Differential Revision: https://phabricator.services.mozilla.com/D72745
2020-05-27 18:15:36 +00:00
Tim Huang da6cd292da Bug 1641153 - Change the MOZ_DIAGNOSTIC_ASSERT to MOZ_ASSERT in ClientSource.cpp r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D77001
2020-05-27 08:53:45 +00:00
Tim Huang 8d0fd9b1f8 Bug 1637226 - Part 3: Revert the assertion in ClientSource.cpp back to MOZ_DIAGNOSTIC_ASSERT. r=dimi
Depends on D76732

Differential Revision: https://phabricator.services.mozilla.com/D76733
2020-05-26 07:27:25 +00:00
Aaron Klotz 7a8903706b Bug 1637452: Part 17 - Fix JNI includes in dom; r=nika
In this bug we're moving away from monolithic JNI headers to class-specific
headers so that we don't have to rebuild the world every time we make a change
to a JNI interface.

Differential Revision: https://phabricator.services.mozilla.com/D75380
2020-05-15 17:06:28 +00:00
Razvan Maries 481517ce87 Backed out 2 changesets (bug 1558394) for perma failures on iframe_sandbox_anchor_download_block_downloads.sub.tentative.html. CLOSED TREE
Backed out changeset 79046ff8143b (bug 1558394)
Backed out changeset e13ede3c68d4 (bug 1558394)
2020-05-15 19:18:34 +03:00
Sebastian Streich bb0855332f Bug 1558394 - Pass the TriggeringSandboxFlags to nsILoadinfo r=ckerschb,smaug,necko-reviewers,valentin
Add triggering Sandbox flags to loadinfo
***
Pass triggering Flags into Loadinfo

Differential Revision: https://phabricator.services.mozilla.com/D69588
2020-05-15 14:03:28 +00:00
Bogdan Tara edcb53f163 Backed out 2 changesets (bug 1558394) for nsDocShellLoadState related bustage CLOSED TREE
Backed out changeset 5889105bd089 (bug 1558394)
Backed out changeset 80a0ea17c9f8 (bug 1558394)
2020-05-14 15:17:32 +03:00
Sebastian Streich 9ce86dc585 Bug 1558394 - Pass the TriggeringSandboxFlags to nsILoadinfo r=ckerschb,smaug,necko-reviewers,valentin
Add triggering Sandbox flags to loadinfo
***
Pass triggering Flags into Loadinfo

Differential Revision: https://phabricator.services.mozilla.com/D69588
2020-05-14 10:04:44 +00:00
Tim Huang 8d36a1fa47 Bug 1637226 - Change the MOZ_DIAGNOSTIC_ASSERT in the ClientSource::WindowExecutionReady() to MOZ_ASSERT. r=dimi
In order to reduce the crash issue for users. Change this assertion to
MOZ_ASSERT.

Differential Revision: https://phabricator.services.mozilla.com/D74962
2020-05-12 20:59:08 +00:00
ssengupta cf852bbfb9 Bug 1635399 - Function PrincipalInfoToPrincipal now returns Result<nsCOMPtr<nsIPrincipal>, nsresult> r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D73868
2020-05-12 19:02:05 +00:00
Simon Giesecke 88f217f6f8 Bug 1626570 - Improve handling of copying arrays in dom/clients/. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D73644
2020-05-05 14:12:54 +00:00
Emilio Cobos Álvarez 761e9dfe4c Bug 1635094 - Cleanup the ReferrerInfo code. r=ckerschb
The cast in InitWithNode is wrong. AsElement() asserts instead of
checking the flag, so we always pass an element (and if we didn't we'd
have type confusion problems). I audited the callers and we're fine.

Anyhow, always require an element, and add two convenience constructors
for C++ code.

Differential Revision: https://phabricator.services.mozilla.com/D73636
2020-05-04 18:50:20 +00:00
Cosmin Sabou 71a40eae48 Backed out 2 changesets (bug 1635094) for build bustages on nsMacShellService.cpp. CLOSED TREE
Backed out changeset 0a2b0c6ea19a (bug 1635094)
Backed out changeset ead4f26f76ee (bug 1635094)
2020-05-04 20:04:06 +03:00
Emilio Cobos Álvarez 6dde680742 Bug 1635094 - Cleanup the ReferrerInfo code. r=ckerschb
The cast in InitWithNode is wrong. AsElement() asserts instead of
checking the flag, so we always pass an element (and if we didn't we'd
have type confusion problems). I audited the callers and we're fine.

Anyhow, always require an element, and add two convenience constructors
for C++ code.

Differential Revision: https://phabricator.services.mozilla.com/D73636
2020-05-04 16:26:51 +00:00
Tim Huang 206dbc83de Bug 1631234 - Part 2: Moving the setting of the 'HasStoragePermission' before the first check of the storage access in nsGlobalWindowOuter::SetNewDocument(). r=baku
Because we would check the storage access permission inside
nsGlobalWindowInner::ExecutionReady(), so we need to set the
'HasStoragePermission' flag before we call it in
nsGlobalWindowOuter::SetNewDocument().

In addition, we check the assertion in the
ClientSource::WindowExecutionReady() back to a diagnostic assertion.

Depends on D71564

Differential Revision: https://phabricator.services.mozilla.com/D71565
2020-04-22 14:49:22 +00:00
Tim Huang cc191c2a88 Bug 1631234 - Change the diagnostic assertion of the storage aceess in the ClientSource to a regular assertion. r=dimi
We change this assertion to a normal to ease the crash problem from
users and will do a further investigation to know the root cause.

Differential Revision: https://phabricator.services.mozilla.com/D71525
2020-04-20 09:39:48 +00:00
Christoph Kerschbaumer 7e43ad336f Bug 1621987: Implement Sec-Fetch-User. r=baku,edgar,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D69392

--HG--
extra : moz-landing-system : lando
2020-04-16 08:04:26 +00:00
Anny Gakhokidze 20680c6e57 Bug 1622749 - Force new documents resulting from clicking on notifications to open in tabs so we don't crash, r=nika
This is a temporary solution as we don't want to permanently override users'
preferences.

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

--HG--
extra : moz-landing-system : lando
2020-04-14 17:44:32 +00:00
Kris Maglione 9742588080 Bug 1626404: Part 2a - Store source BrowsingContext rather than DocShell in LoadState. r=nika CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D69418

--HG--
extra : source : 6fb384961b99821bacfd2702d36bff27231c96a7
extra : intermediate-source : b0d4b213b819d2346b1026122335553b77d63cae
2020-04-04 02:42:44 +00:00
Bogdan Tara 7a09dad859 Backed out 6 changesets (bug 1626404) for frequent timeouts on test_postMessage_onOther.html CLOSED TREE
Backed out changeset 453b858f4462 (bug 1626404)
Backed out changeset f54ce6a36c75 (bug 1626404)
Backed out changeset ec63b18da4b9 (bug 1626404)
Backed out changeset b0d4b213b819 (bug 1626404)
Backed out changeset af763de00e9d (bug 1626404)
Backed out changeset 45b68d43bdbb (bug 1626404)
2020-04-09 11:07:40 +03:00
Kris Maglione edf0e3ba56 Bug 1626404: Part 2a - Store source BrowsingContext rather than DocShell in LoadState. r=nika CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D69418

--HG--
extra : source : 6fb384961b99821bacfd2702d36bff27231c96a7
extra : histedit_source : a380148c947dd2d5d53787ec6027ab387093a7c1
2020-04-04 02:42:44 +00:00
Oana Pop Rus 87d90e34dd Backed out 6 changesets (bug 1626404) for mochitest failures in BrowsingContext.cpp on a CLOSED TREE
Backed out changeset 4a3b391e08c4 (bug 1626404)
Backed out changeset 1a5a559ec6d5 (bug 1626404)
Backed out changeset 2ffdab0072e7 (bug 1626404)
Backed out changeset 6fb384961b99 (bug 1626404)
Backed out changeset c0c2e85e33da (bug 1626404)
Backed out changeset bf32b30efa49 (bug 1626404)

--HG--
extra : rebase_source : 466bf9356539fbc47cb015df212e38698322bfb3
2020-04-09 00:22:49 +03:00
Kris Maglione f2708013e8 Bug 1626404: Part 2a - Store source BrowsingContext rather than DocShell in LoadState. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D69418

--HG--
extra : moz-landing-system : lando
2020-04-04 02:42:44 +00:00
Andreas Farre f2fa2e633c Bug 1620594 - Part 5: Use GetMainThreadSerialEventTarget instead of SystemGroup::EventTargetFor. r=nika
This patch also tries to remove the event target entirely if it would
default to the main thread on a null event target.

Depends on D67634

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

--HG--
extra : moz-landing-system : lando
2020-04-07 15:17:07 +00:00
Andreas Farre 36eaf82163 Bug 1620594 - Part 2: Use SchedulerGroup::Dispatch instead of SystemGroup::Dispatch. r=nika
Depends on D67631

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

--HG--
extra : moz-landing-system : lando
2020-04-07 15:16:33 +00:00
Narcis Beleuzu 00218b8a49 Backed out 6 changesets (bug 1626404) for assertion failures on BrowsingContext.cpp . CLOSED TREE
Backed out changeset aed006ab4c20 (bug 1626404)
Backed out changeset ad87dcb98637 (bug 1626404)
Backed out changeset c065bd4594b4 (bug 1626404)
Backed out changeset a248fc78ab0c (bug 1626404)
Backed out changeset 52892d053ff1 (bug 1626404)
Backed out changeset 440b9193338a (bug 1626404)
2020-04-04 05:29:30 +03:00
Kris Maglione 4024d7dc97 Bug 1626404: Part 2a - Store source BrowsingContext rather than DocShell in LoadState. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D69418

--HG--
extra : moz-landing-system : lando
2020-04-04 00:13:01 +00:00
Narcis Beleuzu ef38cbbda1 Backed out 6 changesets (bug 1626404) for bustages on LocationBase.cpp . CLOSED TREE
Backed out changeset a399dfff2725 (bug 1626404)
Backed out changeset ad3272abd830 (bug 1626404)
Backed out changeset 322c170e8301 (bug 1626404)
Backed out changeset df37f57cfa1d (bug 1626404)
Backed out changeset e255e4c9e665 (bug 1626404)
Backed out changeset 51120d617459 (bug 1626404)
2020-04-04 02:42:18 +03:00
Kris Maglione 70a8120363 Bug 1626404: Part 2a - Store source BrowsingContext rather than DocShell in LoadState. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D69418

--HG--
extra : moz-landing-system : lando
2020-04-03 22:41:29 +00:00
Ryan VanderMeulen 5012cc0f5d Backed out 6 changesets (bug 1584007) for causing bug 1625227.
Backed out changeset c626a363823e (bug 1584007)
Backed out changeset 0d130a64b0f5 (bug 1584007)
Backed out changeset 8ca43f80bdd2 (bug 1584007)
Backed out changeset 00eda7b39a13 (bug 1584007)
Backed out changeset ac2765b4b4ec (bug 1584007)
Backed out changeset 24deb3d46783 (bug 1584007)

--HG--
extra : amend_source : 9431aa82b4a472f0c60dcf1368817fe7c658bcf5
2020-03-30 14:53:46 -04:00
Andrea Marchesini 9ea9920b65 Bug 1503787 - Make WindowExecutionReady assertions MOZ_ASSERT only, r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D68538

--HG--
extra : moz-landing-system : lando
2020-03-27 14:46:35 +00:00
Perry Jiang a6d30433e1 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).

Depends on D66529

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

--HG--
extra : moz-landing-system : lando
2020-03-24 15:52:37 +00:00
Perry Jiang 45fc75766f 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

--HG--
extra : moz-landing-system : lando
2020-03-24 15:18:31 +00:00
Perry Jiang 4f2d95544d Bug 1584007 - allow ClientManager to register "future" ClientSources r=dom-workers-and-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D66520

--HG--
extra : moz-landing-system : lando
2020-03-24 15:18:29 +00:00
Perry Jiang 7dbfd819b4 Bug 1584007 - let ClientHandleParents wait on FutureClientSourceParents r=dom-workers-and-storage-reviewers,mattwoodrow,asuth
Differential Revision: https://phabricator.services.mozilla.com/D66154

--HG--
extra : moz-landing-system : lando
2020-03-24 15:16:57 +00:00
Perry Jiang 21f57afb8b 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

--HG--
extra : moz-landing-system : lando
2020-03-24 15:16:50 +00:00
Perry Jiang 75c94e9b42 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

--HG--
extra : moz-landing-system : lando
2020-03-24 15:16:42 +00:00
Bas Schouten 1bc21ff19c Bug 1563335 - Part 1: Implement mechanism to throttle JS execution. r=smaug,asuth
Differential Revision: https://phabricator.services.mozilla.com/D59321

--HG--
extra : moz-landing-system : lando
2020-03-26 00:36:24 +00:00
Daniel Huigens 7f0520ae9a Bug 1598278 - Check that Service Worker controls client in navigate() r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D66040

--HG--
extra : moz-landing-system : lando
2020-03-24 23:35:38 +00:00
Kristen Wright 5094f72a18 Bug 1622111 - Convert security.data_uri.unique_opaque_origin to static pref and remove ClientPrefs. r=njn
Converts security.data_uri.unique_opaque_origin to a static pref. This pref was initialized by the ClientManager in ClientPrefs, so this commit also removes those files. Somehow this pref was getting added in VarCache twice, so it also removes the places where the pref was added in Networking.

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

--HG--
extra : moz-landing-system : lando
2020-03-23 16:08:52 +00:00
Mihai Alexandru Michis b6435f7773 Backed out 5 changesets (bug 1584007) for causing crashes in ClientManagerService.
CLOSED TREE

Backed out changeset e8e6a6bb50ff (bug 1584007)
Backed out changeset 9468d92f2a55 (bug 1584007)
Backed out changeset 19ed74a7ea6f (bug 1584007)
Backed out changeset 6c35d3d0f747 (bug 1584007)
Backed out changeset ea67977a5cdd (bug 1584007)
2020-03-24 11:29:22 +02:00
Perry Jiang 373ae45772 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

--HG--
extra : moz-landing-system : lando
2020-03-24 02:34:20 +00:00
Perry Jiang 54f6dbaac3 Bug 1584007 - allow ClientManager to register "future" ClientSources r=dom-workers-and-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D66520

--HG--
extra : moz-landing-system : lando
2020-03-24 02:34:12 +00:00
Perry Jiang 6b14fd7ea2 Bug 1584007 - let ClientHandleParents wait on FutureClientSourceParents r=dom-workers-and-storage-reviewers,mattwoodrow,asuth
Differential Revision: https://phabricator.services.mozilla.com/D66154

--HG--
extra : moz-landing-system : lando
2020-03-24 02:34:10 +00:00
Perry Jiang d1cc3d5d84 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

--HG--
extra : moz-landing-system : lando
2020-03-24 02:34:35 +00:00
Perry Jiang b5b13cec75 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

--HG--
extra : moz-landing-system : lando
2020-03-24 02:33:54 +00:00