Commit Graph

3184 Commits

Author SHA1 Message Date
Kris Maglione
232ff37e9f Bug 1535617: Part 2 - Clear weak references for most cycle collected objects on unlink. r=mccr8
This covers most cycle collected objects which support weak references, but
not the ones which inherit from a cycle collected class and don't do any cycle
collection on their own.

Differential Revision: https://phabricator.services.mozilla.com/D63962
2020-02-25 19:44:39 +00:00
Matt Woodrow
d873efea87 Bug 1614847 - Construct nsDocShellLoadState in ContentChild to avoid needing to pass excess parameters into nsDocShell. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D63267
2020-02-24 02:16:24 +00:00
Matt Woodrow
08b49cc241 Bug 1615967 - Move customUserAgent to BrowsingContext. r=nika,remote-protocol-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D63040
2020-02-24 02:15:03 +00:00
Noemi Erli
f5b72c4da0 Backed out 5 changesets (bug 1597154) for causing browser-chrome failures in browser_UITour_showNewTab.js CLOSED TREE
Backed out changeset dc78c6d3d737 (bug 1597154)
Backed out changeset 6e82c600d52f (bug 1597154)
Backed out changeset 9857504c26e6 (bug 1597154)
Backed out changeset e8dccb59bf2a (bug 1597154)
Backed out changeset 3c34ca1e2079 (bug 1597154)
2020-02-21 04:39:43 +02:00
Paul Bone
2f995da009 Bug 1597154 - pt 5. Rename SchemeUsesDocChannel r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D59823
2020-02-20 23:54:32 +00:00
Paul Bone
3ffbf31a2c Bug 1597154 - pt 3. Defer to documentchannel for process switching for all schemes r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D58899
2020-02-20 23:53:52 +00:00
Paul Bone
93ad29a003 Bug 1597154 - pt 1. Avoid redirecting loads between processes more than once r=mattwoodrow,kmag
This doesn't fix the bug, but it is a good idea.

Differential Revision: https://phabricator.services.mozilla.com/D57597
2020-02-20 23:53:07 +00:00
Christoph Kerschbaumer
930ed3e091 Bug 1601887 - XFO: Display error page but still fire onload event in case x-frame-options blocks a load.r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D61862
2020-02-11 18:40:54 +00:00
Kris Maglione
d7e4043bb8 Bug 1582832: Part 1 - Make FrameLoader owner rather than DocShell responsible for discarding a BC. r=nika
There are all sorts of lifecycle issues which arise from making DocShell
responsible for discarding BrowsingContexts. In this particular bug, we tend
to run into them in cases where we create a BrowsingContext for a FrameLoader,
and then never create a DocShell for it, leading to it never being destroyed.
But there are myriad other issues as well.

This patch moves the responsibility for BrowsingContext lifecycle management
to the FrameLoader/FrameLoaderOwner, rather than the DocShell, which makes
things more consistent, and more closely aligns with spec-defined behavior.

Differential Revision: https://phabricator.services.mozilla.com/D59008
2020-02-06 19:07:56 +00:00
Boris Zbarsky
ba6aec1f83 Bug 1612529. document.open should clear form state from the SHEntry. r=smaug
Otherwise we're using state from the pre-open document for whatever content is
being written, which is not likely to be right.

Differential Revision: https://phabricator.services.mozilla.com/D61865
2020-02-06 17:49:44 +00:00
Boris Zbarsky
f3d9cda579 Backed out changeset ec4e3e080c1c because it introduces linting failures.
MANUAL PUSH: fast backout
2020-02-06 12:44:12 -05:00
Boris Zbarsky
483b229495 Bug 1612529. document.open should clear form state from the SHEntry. r=smaug
Otherwise we're using state from the pre-open document for whatever content is
being written, which is not likely to be right.

Differential Revision: https://phabricator.services.mozilla.com/D61865
2020-02-06 17:29:20 +00:00
Nihanth Subramanya
fd86f8fa69 Bug 1608713 - Add nsIWebNavigation load flags to force TRR mode and use them to load captive portal tabs with TRR disabled. r=valentin,Gijs,baku
Differential Revision: https://phabricator.services.mozilla.com/D60860
2020-01-24 17:18:35 +00:00
Kershaw Chang
f5178cdb47 Bug 1611472 - Add missing error codes r=mayhemer
In bug 1579049, response code 403 and 501 were changed to map to `NS_ERROR_PROXY_FORBIDDEN` and `NS_ERROR_PROXY_NOT_IMPLEMENTED`. This caused a regression, since 403 and 501 were mapping to `NS_ERROR_PROXY_CONNECTION_REFUSED` before. This patch fixes the regression by adding `NS_ERROR_PROXY_FORBIDDEN` and `NS_ERROR_PROXY_NOT_IMPLEMENTED` to nsDocShell.

Differential Revision: https://phabricator.services.mozilla.com/D61682
2020-02-05 14:32:51 +00:00
Cosmin Sabou
c0491e2272 Bug 1301399 - Delete trailing whitespace. r=pedantic-fix
DONTBUILD
2020-01-28 07:03:32 +02:00
Paul Bone
26c6477e1d Bug 1301399 - Fix comment after removing code r=nika
Differential Revision: https://phabricator.services.mozilla.com/D60802
2020-01-28 04:43:52 +00:00
Perry Jiang
5496c776a9 Bug 1264175 - remove FetchEvent.isReload r=dom-workers-and-storage-reviewers,valentin,sg,bzbarsky
isReload is no longer a property defined by the FetchEvent specification.

Differential Revision: https://phabricator.services.mozilla.com/D60774
2020-01-25 00:05:12 +00:00
Dimi Lee
51d5fc7183 Bug 1601660 - Part 2: Remove getContentBlockingLog from nsIDocShell.idl r=Ehsan
This patch removes the unnecessary getContentBlockingLog function from
nsIDocShell.idl.

Depends on D57464

Differential Revision: https://phabricator.services.mozilla.com/D57444
2020-01-24 11:06:49 +00:00
shindli
a15d7fb755 Backed out changeset 86d1da74131f (bug 1264175) for causing mochitest failures in dom/serviceworkers/test/test_fetch_event.html CLOSED TREE 2020-01-24 06:18:04 +02:00
Tetsuharu OHZEKI
660e0491c4 Bug 1594280 - Fix uses of nsIDocShellTreeItem in nsIDocShellTreeItem in nsDocShell::ValidateOrigin. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D58447
2020-01-23 18:14:42 +00:00
Perry Jiang
fa01983b69 Bug 1264175 - remove FetchEvent.isReload r=dom-workers-and-storage-reviewers,valentin,sg,bzbarsky
isReload is no longer a property defined by the FetchEvent specification.

Differential Revision: https://phabricator.services.mozilla.com/D60774
2020-01-24 02:38:01 +00:00
Paul Bone
2e53e07bb9 Bug 1301399 - Remove annoying session history assertion r=nika
Differential Revision: https://phabricator.services.mozilla.com/D60773
2020-01-23 00:55:53 +00:00
Oana Pop Rus
0691a9a985 Backed out 2 changesets (bug 1601660) for gv-junit failures in ContentBlockingControllerTest. on a CLOSED TREE
Backed out changeset ec5d3b078a88 (bug 1601660)
Backed out changeset 06001b30f6cd (bug 1601660)
2020-01-22 12:06:22 +02:00
Dimi Lee
222a7c3b54 Bug 1601660 - Part 2: Remove getContentBlockingLog from nsIDocShell.idl r=Ehsan
This patch removes the unnecessary getContentBlockingLog function from
nsIDocShell.idl.

Differential Revision: https://phabricator.services.mozilla.com/D57444
2020-01-06 20:00:51 +00:00
Eric Rahm
a2e43ed1d6 Bug 1610386 - Remove nsAutoPtr usage from docshell/. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D60454
2020-01-21 22:29:00 +00:00
Matt Woodrow
6f12105920 Bug 1607991 - Remove ConfigureChannel. r=kmag
The intent of ConfigureChannel was to be code that needed to be applied to both the DocumentChannelChild in the content process, and the real channel in the parent.

It looks like everything in there is either QI'ing to a sub-type of channel (which won't apply to DocumentChannelChild), or is mutating the loadinfo/loadflags (which only need to be done once).

Differential Revision: https://phabricator.services.mozilla.com/D59264
2020-01-17 02:11:40 +00:00
Dorel Luca
58ecbd79df Backed out 5 changesets (bug 1597154) for Mochitest error in docshell/test/mochitest/test_bug529119-2.html. CLOSED TREE
Backed out changeset 051d6f3a237c (bug 1597154)
Backed out changeset 8f8a663e3118 (bug 1597154)
Backed out changeset 1638767d4977 (bug 1597154)
Backed out changeset cc9c332c22a6 (bug 1597154)
Backed out changeset 9580b0a08782 (bug 1597154)
2020-01-16 07:44:40 +02:00
Paul Bone
359c4f9263 Bug 1597154 - pt 5. Rename SchemeUsesDocChannel r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D59823
2020-01-16 03:53:46 +00:00
Paul Bone
aec5c6e795 Bug 1597154 - pt 3. Defer to documentchannel for process switching for all schemes r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D58899
2020-01-16 03:52:46 +00:00
Paul Bone
3fb0a951c1 Bug 1597154 - pt 1. Avoid redirecting loads between processes more than once r=mattwoodrow,kmag
This doesn't fix the bug, but it is a good idea.

Differential Revision: https://phabricator.services.mozilla.com/D57597
2020-01-16 03:52:01 +00:00
Dimi Lee
d59145948e Bug 1601310 - Add GetContentBlockingEvents IPC method for the child to retrive content blocking event in the parent. r=timhuang,twisniewski,Ehsan
This patch does the following:
1. Add a WindowGlobalChild IPC method - GetContentBlockingEvents. Documents can use the method
   retrieve content blocking events stored in the parent process.
2. Update nsIDocShell::GetHasTrackingContentBlocked to return a promise.
3. Replace API in report-site-issue to use the promise-based GetHasTrackingContentBlocked API

Differential Revision: https://phabricator.services.mozilla.com/D56204
2019-12-17 11:05:06 +00:00
Matt Woodrow
f3883f930b Bug 1599438 - Store sandbox flags on the LoadInfo when creating a channel for a docshell, so that we don't read a stale value from the BrowsingContext later. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D59263
2020-01-15 08:02:57 +00:00
Narcis Beleuzu
bf2b2d612d Backed out changeset b3538b7016aa (bug 1599438) for bustages on TestHttpFuzzing.cpp . CLOSED TREE 2020-01-15 06:03:55 +02:00
Narcis Beleuzu
4723d54743 Backed out changeset ea7d48958f2f (bug 1594280) for mochitest failures on nsDocShell.cpp . CLOSED TREE 2020-01-15 05:50:28 +02:00
Matt Woodrow
5f6fd6d997 Bug 1599438 - Store sandbox flags on the LoadInfo when creating a channel for a docshell, so that we don't read a stale value from the BrowsingContext later. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D59263
2020-01-15 02:05:57 +00:00
Tetsuharu OHZEKI
abbe92b5c8 Bug 1594280 - Fix uses of nsIDocShellTreeItem in nsIDocShellTreeItem in nsDocShell::ValidateOrigin. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D58447
2020-01-14 21:03:52 +00:00
Matt Woodrow
9ea8c6570f Bug 1607987 - Split DocumentChannelChild into two classes. r=jya
This shouldn't have any functional changes, and adds some new comments to explain the purpose of the classes a bit better.

Differential Revision: https://phabricator.services.mozilla.com/D59265
2020-01-13 00:28:13 +00:00
Ciure Andrei
c6f59c79e3 Backed out changeset ca6f43c06131 (bug 1607987) for causing test_bug369370.html to permafail 2020-01-13 04:10:57 +02:00
Matt Woodrow
cf1f801e8b Bug 1607987 - Split DocumentChannelChild into two classes. r=jya
This shouldn't have any functional changes, and adds some new comments to explain the purpose of the classes a bit better.

Differential Revision: https://phabricator.services.mozilla.com/D59265
2020-01-13 00:28:13 +00:00
Johann Hofmann
282e012e20 Bug 353933 - Make OnOverlink use CreateExposableURI. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D59428
2020-01-10 12:45:38 +00:00
Matt Woodrow
86c525d4e7 Bug 1598523 - Enable DocumentChannel for view-source. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D57894
2020-01-08 01:00:43 +00:00
Matt Woodrow
452cbf7077 Bug 1598523 - Share code for creating a channel for a document between nsDocShell, DocumentChannelChild and ContentChild. r=kmag
Note that this also implicitly adds support for the view-source+srcdoc configuration, and setting of the BaseURI, which were both in the nsDocShell version but not the others.

Differential Revision: https://phabricator.services.mozilla.com/D57887
2020-01-08 02:10:54 +00:00
Bogdan Tara
191d90bec0 Backed out 6 changesets (bug 1598523) for geckoview failures complaining about NavigationDelegateTest.loadUnknownProtocol
Backed out changeset 2e7ea1ae7fa2 (bug 1598523)
Backed out changeset 6adc1062662b (bug 1598523)
Backed out changeset 141372c43f02 (bug 1598523)
Backed out changeset c5abcaabaf2d (bug 1598523)
Backed out changeset 5a22a20dd993 (bug 1598523)
Backed out changeset e0df103c9cf3 (bug 1598523)
2020-01-08 02:56:18 +02:00
Matt Woodrow
3d34bed9be Bug 1598523 - Enable DocumentChannel for view-source. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D57894
2020-01-07 20:58:20 +00:00
Matt Woodrow
40b9b10577 Bug 1598523 - Share code for creating a channel for a document between nsDocShell, DocumentChannelChild and ContentChild. r=kmag
Note that this also implicitly adds support for the view-source+srcdoc configuration, and setting of the BaseURI, which were both in the nsDocShell version but not the others.

Differential Revision: https://phabricator.services.mozilla.com/D57887
2020-01-07 21:17:22 +00:00
Tetsuharu OHZEKI
b4b7ece113 Bug 1575326 - Fix usage of nsIDocShellTreeItem in nsDocShell::SetIsActive. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D58443
2020-01-07 08:08:49 +00:00
Tetsuharu OHZEKI
37027fc3a2 bug 1575328 - Fix usage of nsIDocShellTreeItem in nsDocShell::SetMixedContentChannel. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D58442
2020-01-07 08:16:26 +00:00
Matt Woodrow
e2a14477d6 Bug 1598520 - Allow DocumentChannel for srcdoc= loads. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D57587
2020-01-06 21:36:34 +00:00
Matt Woodrow
8b1b33cac0 Bug 1598520 - Don't require nsIChildChannel for process switching, as we don't need this for DocumentChannel either. r=mayhemer,kmag
Differential Revision: https://phabricator.services.mozilla.com/D57586
2020-01-06 21:58:48 +00:00
Tetsuharu OHZEKI
423370c334 Bug 1606528 - part 2: Replace idioms with BrowsingContext::IsTop(). r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D58481
2020-01-06 19:13:38 +00:00