Commit Graph

3413 Commits

Author SHA1 Message Date
Kris Maglione
1465a5be2f Bug 1626404: Part 4 - Remove now-redundant accessor args from BrowsingContext load methods. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D69421
2020-04-08 19:04:47 +00:00
Kris Maglione
0a3ac7ea55 Bug 1626404: Part 3 - Do sandbox flag checks at both ends of cross-process loads. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D69420
2020-04-04 02:42:39 +00:00
Kris Maglione
8cf3ee1e11 Bug 1626404: Part 2a - Store source BrowsingContext rather than DocShell in LoadState. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D69418
2020-04-04 02:42:44 +00:00
Kris Maglione
90013ea51d Bug 1626404: Part 1 - Move IsSandboxedFrom to BrowsingContext. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D69417
2020-04-04 02:42:30 +00:00
Peter Van der Beken
a2d0ade9f0 Bug 1628282 - Inline nsDocShell::OnLoadingSite into its only caller. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D70179
2020-04-08 11:48:56 +00:00
Marco Bonardo
bee013f896 Bug 1496578 - convert nsDefaultURIFixup to URIFixup.jsm. r=Gijs,farre
Differential Revision: https://phabricator.services.mozilla.com/D66579
2020-04-08 11:30:14 +00:00
Nika Layzell
2b076e179b Bug 1616353 - Part 7.7: Remove window initialization properties which are redundant with nsOpenWindowInfo, r=kmag
These properties used to be passed to newly created content windows in many
different ways, but are now unified under nsOpenWindowInfo. This patch cleans up
the remaining properties.

Differential Revision: https://phabricator.services.mozilla.com/D67056
2020-04-07 21:39:44 +00:00
Nika Layzell
63bd4e74fb Bug 1616353 - Part 6.2: Remove setOriginAttributesBeforeLoading API, r=smaug
This API is no longer possible to implement, as it will always try to set the
OriginAttributes on a content BrowsingContext after it has been attached, and JS
can never observe a detached BrowsingContext.

Users of this API are instead changed to perform assertions that
originAttributes have already been set correctly.

Differential Revision: https://phabricator.services.mozilla.com/D67046
2020-04-07 21:39:14 +00:00
Nika Layzell
ea10ffb31a Bug 1616353 - Part 6.1: Implement nsILoadContext on BrowsingContext, r=smaug
This also moves nsDocShell's implementation of nsILoadContext to be based on its
BrowsingContext.

This patch does not, by itself, fix all places which try to mutate
`nsILoadContext`. Those are fixed by the other parts of this patch stack.

Differential Revision: https://phabricator.services.mozilla.com/D67045
2020-04-07 21:39:12 +00:00
Razvan Maries
2229957d40 Backed out changeset b86e8f2cc5db (bug 1496578) for build bustages on nsDocShell.cpp. CLOSED TREE 2020-04-08 01:16:33 +03:00
Marco Bonardo
47b3ead8af Bug 1496578 - convert nsDefaultURIFixup to URIFixup.jsm. r=Gijs,farre
Differential Revision: https://phabricator.services.mozilla.com/D66579
2020-04-07 21:55:24 +00:00
Andreas Farre
9509fc894a Bug 1620594 - Part 7: Remove TabGroup and SystemGroup. r=nika,bas
TabGroup never really made any difference in which thread something go
dispatched to. This was the intended use, but development of TabGroups
with abstract main threads never made it that far. The good thing is
that thish makes it safe to also remove to the SystemGroup and instead
switch all SystemGroup dispatches to dispatches to main thread.

Timers for setTimeout and workers were the sole users of wrapped and
throttled event targets, that those throttled queues have been moved
to the BrowsingContextGroup and are now accessed explicitly.

The SchedulerEventTarget has been removed, since there are no longer a
separate event target for every TaskCategory. Instead a
LabellingEventTarget has been added to DocGroup to handle the case
where an event is dispatched do DocGroup or when an AbstractThread is
created using a DocGroup. This means that we'll actually label more
events correctly with the DocGroup that they belong to.

DocGroups have also been moved to BrowsingContextGroup.

Depends on D67636

Differential Revision: https://phabricator.services.mozilla.com/D65936
2020-04-07 15:17:47 +00:00
Andreas Farre
4ca438fe5b Bug 1620594 - Part 3: Use default target for timers using SystemGroup. r=nika
Depends on D67632

Differential Revision: https://phabricator.services.mozilla.com/D67633
2020-04-07 15:16:46 +00:00
Emilio Cobos Álvarez
46f64ba715 Bug 1627707 - Rename LoadInfo::LoadingPrincipal to GetLoadingPrincipal as it can return null. r=ckerschb
Mostly a matter of:

  rg -l '\->LoadingPrincipal' | xargs sed -i 's/->LoadingPrincipal/->GetLoadingPrincipal/g'

And then clang-format. But I tweaked manually nsHttpChannelAuthProvider (move
the variable where it's used, don't take a useless strong ref),
AddonContentPolicy (move the declaration of the variable to the if condition),
and BackgroundUtils (same).

Differential Revision: https://phabricator.services.mozilla.com/D69828
2020-04-06 18:57:36 +00:00
Cosmin Sabou
8ca4dd2b6f Backed out 3 changesets (bug 1627707) for build bustages @ mozilla::net::LoadInfo.
Backed out changeset 65d6a90651ce (bug 1627707)
Backed out changeset 378ec30d9979 (bug 1627707)
Backed out changeset 058a19e11b06 (bug 1627707)
2020-04-06 20:07:04 +03:00
Cosmin Sabou
357a0887a1 Backed out 24 changesets (bug 1616353) for fission assertion failures nsGlobalWindowOuter.cpp.
Backed out changeset 3a43210e4900 (bug 1616353)
Backed out changeset cb77e9149cf8 (bug 1616353)
Backed out changeset 3aacc7cfe33f (bug 1616353)
Backed out changeset c026b06063a5 (bug 1616353)
Backed out changeset 580e790c5d17 (bug 1616353)
Backed out changeset 6f09bc1c476d (bug 1616353)
Backed out changeset 6955906262c0 (bug 1616353)
Backed out changeset a7700472807a (bug 1616353)
Backed out changeset a4735096e01b (bug 1616353)
Backed out changeset bd1706c57d91 (bug 1616353)
Backed out changeset 363c13296fda (bug 1616353)
Backed out changeset e414df387524 (bug 1616353)
Backed out changeset 765d3364cca0 (bug 1616353)
Backed out changeset 8a13355b4ac4 (bug 1616353)
Backed out changeset ada17fb8fca7 (bug 1616353)
Backed out changeset 6b6b99af186d (bug 1616353)
Backed out changeset ea966e78b296 (bug 1616353)
Backed out changeset cb88e0bbb3b9 (bug 1616353)
Backed out changeset f89a89015114 (bug 1616353)
Backed out changeset ae6058552969 (bug 1616353)
Backed out changeset f42bb5b48c1b (bug 1616353)
Backed out changeset 1ab9d22c73bb (bug 1616353)
Backed out changeset 2692c2c1396b (bug 1616353)
Backed out changeset 11a279c8da08 (bug 1616353)
2020-04-06 20:03:02 +03:00
Emilio Cobos Álvarez
d828790f70 Bug 1627707 - Rename LoadInfo::LoadingPrincipal to GetLoadingPrincipal as it can return null. r=ckerschb
Mostly a matter of:

  rg -l '\->LoadingPrincipal' | xargs sed -i 's/->LoadingPrincipal/->GetLoadingPrincipal/g'

And then clang-format. But I tweaked manually nsHttpChannelAuthProvider (move
the variable where it's used, don't take a useless strong ref),
AddonContentPolicy (move the declaration of the variable to the if condition),
and BackgroundUtils (same).

Differential Revision: https://phabricator.services.mozilla.com/D69828
2020-04-06 16:00:43 +00:00
Nika Layzell
fd1843d5af Bug 1616353 - Part 7.7: Remove window initialization properties which are redundant with nsOpenWindowInfo, r=kmag
These properties used to be passed to newly created content windows in many
different ways, but are now unified under nsOpenWindowInfo. This patch cleans up
the remaining properties.

Differential Revision: https://phabricator.services.mozilla.com/D67056
2020-04-06 14:30:19 +00:00
Nika Layzell
c9e96c7477 Bug 1616353 - Part 6.2: Remove setOriginAttributesBeforeLoading API, r=smaug
This API is no longer possible to implement, as it will always try to set the
OriginAttributes on a content BrowsingContext after it has been attached, and JS
can never observe a detached BrowsingContext.

Users of this API are instead changed to perform assertions that
originAttributes have already been set correctly.

Differential Revision: https://phabricator.services.mozilla.com/D67046
2020-04-06 14:29:50 +00:00
Nika Layzell
458cd6db6a Bug 1616353 - Part 6.1: Implement nsILoadContext on BrowsingContext, r=smaug
This also moves nsDocShell's implementation of nsILoadContext to be based on its
BrowsingContext.

This patch does not, by itself, fix all places which try to mutate
`nsILoadContext`. Those are fixed by the other parts of this patch stack.

Differential Revision: https://phabricator.services.mozilla.com/D67045
2020-04-06 14:29:47 +00:00
Narcis Beleuzu
0668c5ab4c 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
98bd7e4124 Bug 1626404: Part 4 - Remove now-redundant accessor args from BrowsingContext load methods. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D69421
2020-04-04 00:36:30 +00:00
Kris Maglione
1c110e1fd9 Bug 1626404: Part 3 - Do sandbox flag checks at both ends of cross-process loads. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D69420
2020-04-04 00:12:57 +00:00
Kris Maglione
31f94f56a7 Bug 1626404: Part 2a - Store source BrowsingContext rather than DocShell in LoadState. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D69418
2020-04-04 00:13:01 +00:00
Kris Maglione
99164ee547 Bug 1626404: Part 1 - Move IsSandboxedFrom to BrowsingContext. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D69417
2020-04-04 00:13:04 +00:00
Narcis Beleuzu
518dd9a134 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
6d933b2e13 Bug 1626404: Part 4 - Remove now-redundant accessor args from BrowsingContext load methods. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D69421
2020-04-03 22:42:25 +00:00
Kris Maglione
e4f39e6caa Bug 1626404: Part 3 - Do sandbox flag checks at both ends of cross-process loads. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D69420
2020-04-03 22:42:17 +00:00
Kris Maglione
f370ac6fdf Bug 1626404: Part 2a - Store source BrowsingContext rather than DocShell in LoadState. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D69418
2020-04-03 22:41:29 +00:00
Kris Maglione
a5d565da2f Bug 1626404: Part 1 - Move IsSandboxedFrom to BrowsingContext. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D69417
2020-04-03 22:41:26 +00:00
Olli Pettay
672db2afe9 Bug 1620818 - Release nsDocShell::mContentViewer properly. r=nika,peterv a=dveditz
Differential Revision: https://phabricator.services.mozilla.com/D69383
2020-04-02 14:43:50 +00:00
Matt Woodrow
59af4dafea Bug 1626417 - Try enabling DocumentChannel for about:privatebrowsing. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D69096
2020-04-02 00:47:43 +00:00
Paul Bone
9c3612e76f Bug 1597154 - pt 4. Rename SchemeUsesDocChannel r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D59823
2020-04-01 00:33:31 +00:00
Paul Bone
df3100255b Bug 1597154 - pt 3. Flip documentchannel whitelist to blacklist r=mattwoodrow
This fixes 1597154 because the lists of URIs here and in nsDocShell now
match.

Note that they don't exactly match, there's an exception for about:newtab
which we'll fix in a follow-up bug.

Differential Revision: https://phabricator.services.mozilla.com/D69136
2020-04-01 01:17:13 +00:00
Paul Bone
152660fe2d Bug 1597154 - pt 1. Add a comment about checking GetPendingRedirectedChannel r=mattwoodrow,kmag
Differential Revision: https://phabricator.services.mozilla.com/D57597
2020-04-01 00:32:17 +00:00
sonakshi
3f409eb5d3 Bug 1622619 - Replace URIParams with nsIURI in PContent.ipdl r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D67729
2020-03-31 18:47:30 +00:00
Razvan Maries
548846f7f9 Backed out changeset 2515c5b5a0d2 (bug 1622619) for build bustages. CLOSED TREE 2020-03-31 17:18:38 +03:00
sonakshi
f81266b3a5 Bug 1622619 - Replace URIParams with nsIURI in PContent.ipdl r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D67729
2020-03-31 13:38:55 +00:00
Emilio Cobos Álvarez
ed9160f93b Bug 1625792 - Remove nsIURIContentListener.onStartURIOpen. r=mattwoodrow
It's only used to check whether the docshell is gone already, and we need to
deal with that in other places anyway. No other useful implementation.

In comm-central there are a couple, but they're useless too.

Differential Revision: https://phabricator.services.mozilla.com/D68731
2020-03-29 22:10:09 +00:00
Emilio Cobos Álvarez
4f09c5fde0 Bug 1528305 - Don't show an error page for unknown protocols for page-triggered navigations that replace a document. r=mattwoodrow
Pages apparently do this to try to open to native apps, and that on Firefox
causes an error page to be shown if the app is not installed, which is pretty
bad.

Differential Revision: https://phabricator.services.mozilla.com/D68471
2020-03-27 17:20:14 +00:00
Csoregi Natalia
89adce6d10 Backed out changeset 8aeb06899b10 (bug 1528305) for failures on test_location_href_unknown_protocol.html. CLOSED TREE 2020-03-27 08:07:32 +02:00
Emilio Cobos Álvarez
9f539611c5 Bug 1528305 - Don't show an error page for unknown protocols for page-triggered navigations that replace a document. r=mattwoodrow
Pages apparently do this to try to open to native apps, and that on Firefox
causes an error page to be shown if the app is not installed, which is pretty
bad.

Differential Revision: https://phabricator.services.mozilla.com/D68471
2020-03-27 00:06:25 +00:00
Emilio Cobos Álvarez
dd0a18c9a4 Bug 1625304 - Remove INTERNAL_LOAD_FLAGS_IS_USER_TRIGGERED. r=mattwoodrow
It's unused (modulo assertions that mask it off), and I want to add something
similar for bug 1528305, so this avoids some confusion.

Differential Revision: https://phabricator.services.mozilla.com/D68456
2020-03-26 22:39:16 +00:00
Nika Layzell
1bd6d66011 Bug 1616991 - Rename WindowGlobalChild::WindowGlobal getter to reflect nullability, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D64660
2020-03-23 23:03:50 +00:00
Kristen Wright
2209bd50ed 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
2020-03-23 16:08:52 +00:00
Matt Woodrow
768eaa770a Bug 1613002 - Fix process switch channel connection race. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D67090
2020-03-19 22:30:07 +00:00
Masatoshi Kimura
7355e130aa Bug 1623222 - Remove the charset parameter from nsITextToSubURI::UnEscapeURIForUI. r=hsivonen
Only 3 callers are using a non-UTF-8 charset as the first parameter.
* MediaDocument.cpp: This does not make sense because the "filename" part of
  URLs will always be encoded with UTF-8.
* nsContextMenu.js: This is wrong because "mailto:" URLs don't care about the
  document charset.
* Finder.jsm: This caused bug 1623222.

Differential Revision: https://phabricator.services.mozilla.com/D67386
2020-03-19 10:45:28 +00:00
Dan Glastonbury
796f836288 Bug 1621192 - P4: Remove documentOpenFlags from DocumentChannelCreationArgs. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D66170
2020-03-19 01:49:24 +00:00
Dan Glastonbury
65f93a52a9 Bug 1621192 - P3: Remove mPluginsAllowed from DocumentChannel. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D66169
2020-03-19 01:49:11 +00:00
Dan Glastonbury
0d44ecd70d Bug 1621192 - P2: Move allowContentRetargeting to BrowsingContext. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D66168
2020-03-19 01:49:04 +00:00