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

287 Коммитов

Автор SHA1 Сообщение Дата
Junior Hsu da7ef4914b Bug 1645901 - handle cookie setting in child process for Set-Cookie response, r=baku,mayhemer,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D82130
2020-07-07 15:19:09 +00:00
Junior Hsu 9b0685fe4c Bug 1646592 - P4 Remove the depedency between OnStartRequestSent and AttachStreamFilter, r=mayhemer,necko-reviewers
We're shorter the name!

Depends on D81274

Differential Revision: https://phabricator.services.mozilla.com/D81275
2020-07-07 21:46:34 +00:00
Junior Hsu 069f0d6456 Bug 1646592 - P3 Sending endpoint of stream filter via PHttpBackgroundChannel, r=mayhemer,necko-reviewers
Endpoint would be passed by a series of std::move via
nsHttpChannel -> HttpChannelParent -> HttpBackgroundChannelParent ---> HttpBackgroundChannelChild -> HttpChannelChild
												|
												|
   Resolve promise after successfully send IPC<-/

Depends on D81273

Differential Revision: https://phabricator.services.mozilla.com/D81274
2020-07-07 21:46:01 +00:00
Butkovits Atila b75fb2d3e0 Backed out 4 changesets (bug 1646592) for xpcshell failures on test_ext_webRequest_filterResponseData.js CLOSED TREE
Backed out changeset cc60e258290e (bug 1646592)
Backed out changeset 3a514b227127 (bug 1646592)
Backed out changeset de9ba1eaded1 (bug 1646592)
Backed out changeset 31aab78792d8 (bug 1646592)
2020-06-30 21:50:45 +03:00
Junior Hsu cf2bd325c2 Bug 1646592 - P4 Remove the depedency between OnStartRequestSent and AttachStreamFilter, r=mayhemer,necko-reviewers
We're shorter the name!

Differential Revision: https://phabricator.services.mozilla.com/D81275
2020-06-30 00:35:22 +00:00
Junior Hsu b5d505b9d7 Bug 1646592 - P3 Sending endpoint of stream filter via PHttpBackgroundChannel, r=mayhemer,necko-reviewers
Endpoint would be passed by a series of std::move via
nsHttpChannel -> HttpChannelParent -> HttpBackgroundChannelParent ---> HttpBackgroundChannelChild -> HttpChannelChild
												|
												|
   Resolve promise after successfully send IPC<-/

Differential Revision: https://phabricator.services.mozilla.com/D81274
2020-06-30 00:35:12 +00:00
Junior Hsu 64161823b3 Bug 1633935 - P12 top-level IPC stream filter should happen before OnStartRequest, r=mayhemer,necko-reviewers
The WebRequest will suspend the channel in nsHttpChannel::PrepareToConnect(), apply the stream filter, send the main thread IPC  and resume.
That is, PHttpChannel::AttachStreamFilter should be handled in Child before OnStartRequest goes to listener.

Differential Revision: https://phabricator.services.mozilla.com/D79770
2020-06-30 00:34:32 +00:00
Junior Hsu f0b8d33e0b Bug 1633935 - P3 send OS*R and ODA via pHttpChannel for multipart channel, r=mayhemer,necko-reviewers
Depends on D76969

Differential Revision: https://phabricator.services.mozilla.com/D76970
2020-06-30 00:32:53 +00:00
Butkovits Atila 6d4dc7f680 Backed out 13 changesets (bug 1633935) as requested by Junior. CLOSED TREE
Backed out changeset 398fc19f5f6a (bug 1633935)
Backed out changeset 25822279ba5b (bug 1633935)
Backed out changeset e87b11c172b9 (bug 1633935)
Backed out changeset 709f8d50aa33 (bug 1633935)
Backed out changeset 3b268ac50692 (bug 1633935)
Backed out changeset ac9c5c1e5162 (bug 1633935)
Backed out changeset 292a5b34e9f7 (bug 1633935)
Backed out changeset 6251c22cc8f1 (bug 1633935)
Backed out changeset 73b51a139c91 (bug 1633935)
Backed out changeset 2a9873ad6856 (bug 1633935)
Backed out changeset be03e0e7b645 (bug 1633935)
Backed out changeset df5abc2c0734 (bug 1633935)
Backed out changeset 19dcca77a1cf (bug 1633935)
2020-06-25 20:25:36 +03:00
Junior Hsu 521cb5ca3f Bug 1633935 - P12 top-level IPC stream filter should happen before OnStartRequest, r=mayhemer,necko-reviewers
The WebRequest will suspend the channel in nsHttpChannel::PrepareToConnect(), apply the stream filter, send the main thread IPC  and resume.
That is, PHttpChannel::AttachStreamFilter should be handled in Child before OnStartRequest goes to listener.

Differential Revision: https://phabricator.services.mozilla.com/D79770
2020-06-23 16:58:40 +00:00
Junior Hsu 7d6e5f2dd9 Bug 1633935 - P3 send OS*R and ODA via pHttpChannel for multipart channel, r=mayhemer,necko-reviewers
Depends on D76969

Differential Revision: https://phabricator.services.mozilla.com/D76970
2020-06-23 16:56:45 +00:00
Andreas Farre ca5db92916 Bug 1590762 - Part 2: Bump the id for channel registration to uint64_t. r=mattwoodrow,necko-reviewers,valentin
This patch also makes the identifier for channels global, in the sense
that the generated identifier is generated outside of and passed to
the nsIRedirectChannelRegistrar.

Differential Revision: https://phabricator.services.mozilla.com/D79820
2020-06-23 13:18:56 +00:00
Junior Hsu 97115bd8ef Bug 1645527 - P2 move OverrideReferrerInfoDuringBeginConnect to PHttpChannel::OnStartRequest, r=baku,valentin,necko-reviewers,mayhemer
We're going to send OnStartRequest via PHttpBackgroundChannel, anything sending via PHttpChannel before OnStartRequest
would be a race.

https://phabricator.services.mozilla.com/D49773#inline-303635
This link implicates that OverrideReferrerInfoDuringBeginConnect is fine just before OnStartRequest. To reduce the
racy and number of IPCs, I move the referrer info overridden to HttpChannelParent::OnStartRequest.

Differential Revision: https://phabricator.services.mozilla.com/D79580
2020-06-16 15:10:03 +00:00
Junior Hsu 7d2a5e55c5 Bug 1638313 - Let devtool show CORS rejected requests correctly r=necko-reviewers,mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D76255
2020-05-22 02:21:25 +00:00
Cosmin Sabou 2fb40db9fc Backed out changeset 578ecaa1f863 (bug 1638313) for devtools failures on browser_net_filter-01.js. 2020-05-22 03:20:47 +03:00
Junior Hsu 6ff998ce0c Bug 1638313 - Let devtool show CORS rejected requests correctly, r=necko-reviewers,mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D76255
2020-05-21 22:41:44 +00:00
Nika Layzell 2454ade94e Bug 1633820 - Part 3: Get rid of PBrowserOrId, r=mattwoodrow,necko-reviewers,dragana
The 'Id' variant was only used with b2g for remote `mozbrowser`s, and is no
longer relevant. The new code instead uses `PBrowser` directly in all cases.

Differential Revision: https://phabricator.services.mozilla.com/D72933
2020-05-07 22:49:06 +00:00
Razvan Maries 7a5b66f9b6 Backed out 5 changesets (bug 1633820) for build bustages at TabContext.cpp. CLOSED TREE
Backed out changeset 0a20dd1935d7 (bug 1633820)
Backed out changeset 626e834293ed (bug 1633820)
Backed out changeset 14cc454a8cbc (bug 1633820)
Backed out changeset 7bbcb9266b87 (bug 1633820)
Backed out changeset ef99672bd2af (bug 1633820)
2020-05-08 00:59:20 +03:00
Nika Layzell dd35cc6b02 Bug 1633820 - Part 3: Get rid of PBrowserOrId, r=mattwoodrow,necko-reviewers,dragana
The 'Id' variant was only used with b2g for remote `mozbrowser`s, and is no
longer relevant. The new code instead uses `PBrowser` directly in all cases.

Differential Revision: https://phabricator.services.mozilla.com/D72933
2020-05-07 17:45:12 +00:00
Bogdan Tara 7fce40912d Backed out 5 changesets (bug 1633820) for bustages complaining about TabContext CLOSED TREE
Backed out changeset 4982d41d5e6b (bug 1633820)
Backed out changeset 9803c41e42f9 (bug 1633820)
Backed out changeset 2475bbab03a8 (bug 1633820)
Backed out changeset 762f0b2c154c (bug 1633820)
Backed out changeset f9ea871a0227 (bug 1633820)
2020-05-06 22:39:46 +03:00
Nika Layzell da2aae6af5 Bug 1633820 - Part 3: Get rid of PBrowserOrId, r=mattwoodrow,necko-reviewers,dragana
The 'Id' variant was only used with b2g for remote `mozbrowser`s, and is no
longer relevant. The new code instead uses `PBrowser` directly in all cases.

Differential Revision: https://phabricator.services.mozilla.com/D72933
2020-05-06 17:42:41 +00:00
Chris Peterson 9db7016a65 Bug 1630511 - Replace MOZ_MUST_USE with [[nodiscard]] in netwerk. r=necko-reviewers,dragana
Also move MOZ_MUST_USE before function declarations' specifiers and return type. While clang and gcc's __attribute__((warn_unused_result)) can appear before, between, or after function specifiers and return types, the [[nodiscard]] attribute must precede the function specifiers.

Differential Revision: https://phabricator.services.mozilla.com/D71144
2020-04-18 06:37:32 +00:00
Stefan Hindli d56783838a Backed out changeset 4d5737a94b82 (bug 1623038) for causing linux x64 opt build bustage in /builds/worker/checkouts/gecko/netwerk/protocol/http/HttpChannelChild.cpp CLOSED TREE 2020-04-07 21:26:53 +03:00
anjali1903 fc974d51f2 Bug 1623038 Replace URIParams with nsIURI in PHttpChannel.ipdl r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D68003

--HG--
extra : moz-landing-system : lando
2020-03-25 19:56:02 +00:00
Valentin Gosu c0aef79fdb Bug 1625727 - Only pass ChildLoadInfoForwarderArgs when mRedirectChannelChild implements nsIChannel r=ckerschb,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D68811

--HG--
extra : moz-landing-system : lando
2020-03-31 07:56:11 +00:00
Tim Huang 5f67d1c916 Bug 1612378 - Part 7: Remove the ContentBlockingAllowListPrincipal from the nsIHttpChannelInternal. r=dimi,baku
We nolonger need to use the ContentBlockingAllowListPrincipal in the
channel because we move to check the IsOnContentBlockingAllowList in the
CookieJarSettings when we do a content blocking allow list check. Also,
we would potentially expose the cross-origin info through the
ContentBlockingAllowListPrincipal in the channel. Hence, we will remove
it from the channel.

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

--HG--
extra : moz-landing-system : lando
2020-03-25 13:51:05 +00:00
Eric Rahm 2c08316c5d Bug 1610070 - Part 3: Convert the rest of netwerk/ to use UniquePtr. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D60341

--HG--
extra : moz-landing-system : lando
2020-02-11 16:20:08 +00:00
Gabriele Svelto 5dc21d568c Bug 1600545 - Remove useless inclusions of header files generated from IDL files in modules/, netwerk/, parser/, security/, startupcache/, storage/, toolkit/, tools/, uriloader/, widget/, xpcom/ and xpfe/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-06 09:17:57 +00:00
Matt Woodrow 6f0f9e969f Bug 1600211 - Forward AllPartsStopped to HttpChannelChild to ensure that we notify the listeners correctly. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D55223

--HG--
extra : moz-landing-system : lando
2019-12-04 03:19:38 +00:00
Matt Woodrow a26e9542d2 Bug 1600211 - Send OnDataAvailable and OnStopRequest on the main-thread channel when in multi-part mode to avoid complicated races across the two channels. r=mayhemer
This also removes OnStartRequestSent from PHttpBackgroundChannel, since there should never be any messages sent earlier on this channel, so we can just assume the waiting state initially.

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

--HG--
extra : moz-landing-system : lando
2019-12-04 03:18:38 +00:00
Paul Bone 62341d4075 Bug 1596330 - Remove CrossProcessRedirectDone and FinishCrossProcessSwitch r=mattwoodrow
Depends on D52950

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

--HG--
extra : moz-landing-system : lando
2019-11-14 08:43:06 +00:00
Paul Bone 65f606af65 Bug 1596330 - Remove mDoingCrossProcessRedirect r=mattwoodrow
Depends on D52949

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

--HG--
extra : moz-landing-system : lando
2019-11-14 08:43:06 +00:00
Paul Bone 7f953926ba Bug 1596330 - Remove dead process switching code r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D52949

--HG--
extra : moz-landing-system : lando
2019-11-14 08:43:05 +00:00
Ehsan Akhgari c4481cd9ba Bug 1589407 - Part 2: Ensure that document.referrer sees the same URL as what we send in the Referer HTTP header per the ETP restrictions; r=tnguyen,baku
Differential Revision: https://phabricator.services.mozilla.com/D49773

--HG--
extra : moz-landing-system : lando
2019-10-26 21:24:57 +00:00
Coroiu Cristina f9b25eadca Backed out changeset ad44c165c690 (bug 1589407) for browser chrome failures at toolkit/components/antitracking/test/browser/browser_referrerDefaultPolicy.js on a CLOSED TREE 2019-10-25 18:07:14 +03:00
Ehsan Akhgari 0cdd072e23 Bug 1589407 - Ensure that document.referrer sees the same URL as what we send in the Referer HTTP header per the ETP restrictions; r=tnguyen,baku
Differential Revision: https://phabricator.services.mozilla.com/D49773

--HG--
extra : moz-landing-system : lando
2019-10-25 07:32:05 +00:00
Nika Layzell 9791e6d6d9 Bug 1576714 - Part 4: Delay canceling original http channel during process switch, r=mattwoodrow
This patch changes when the original HttpChannelChild gets canceled during a
process switch to be after when the process switch is completed. This is needed
to prevent the load event firing too early in the original content process.

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

--HG--
extra : moz-landing-system : lando
2019-10-15 16:19:18 +00:00
Junior Hsu 2bf558c130 Bug 1566868 - network error for non empty sandboxing flag and non-null COOP r=valentin
Adjust for new spec change (comment 23)

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

--HG--
extra : moz-landing-system : lando
2019-10-15 06:09:26 +00:00
Csoregi Natalia 8768a4f5e3 Backed out 7 changesets (bug 1576714) for fission permafailures on test_bug590812.html. a=backout
Backed out changeset d0c49f00eb91 (bug 1576714)
Backed out changeset faecc9f35b49 (bug 1576714)
Backed out changeset 2e156655c31e (bug 1576714)
Backed out changeset eece722082c7 (bug 1576714)
Backed out changeset ebda40f96884 (bug 1576714)
Backed out changeset 7dce423417d8 (bug 1576714)
Backed out changeset 9a5072019168 (bug 1576714)
2019-10-05 00:08:33 +03:00
Nika Layzell 03df92a7e0 Bug 1576714 - Part 4: Delay canceling original http channel during process switch, r=mattwoodrow
This patch changes when the original HttpChannelChild gets canceled during a
process switch to be after when the process switch is completed. This is needed
to prevent the load event firing too early in the original content process.

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

--HG--
extra : moz-landing-system : lando
2019-10-03 21:40:31 +00:00
Honza Bambas 976b757c89 Bug 1584207 - Forward nsILoadInfo.requestBlockingReason to the parent process for both old and new redirect channels, r=dragana,asuth
Differential Revision: https://phabricator.services.mozilla.com/D47264

--HG--
extra : moz-landing-system : lando
2019-10-01 16:50:23 +00:00
Brindusan Cristian 950e03660b Backed out 6 changesets (bug 1576714) for build bustages at nsFrameLoaderOwner.cpp. CLOSED TREE
Backed out changeset 083967e704d2 (bug 1576714)
Backed out changeset b3467f1bdde7 (bug 1576714)
Backed out changeset 88e3b4b7fbaf (bug 1576714)
Backed out changeset b91221da32c7 (bug 1576714)
Backed out changeset 6996b7705f06 (bug 1576714)
Backed out changeset a303fc193f60 (bug 1576714)
2019-10-02 04:14:53 +03:00
Nika Layzell 5a6a1b3307 Bug 1576714 - Part 4: Delay canceling original http channel during process switch, r=mattwoodrow
This patch changes when the original HttpChannelChild gets canceled during a
process switch to be after when the process switch is completed. This is needed
to prevent the load event firing too early in the original content process.

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

--HG--
extra : moz-landing-system : lando
2019-10-01 18:09:10 +00:00
Jean-Yves Avenard e3fc8f8970 Bug 1575744 - P8. Remove no longer necessary interface. r=mayhemer
Thanks to the promisifying of SendCrossProcessRedirect we no longer needs callback to DocumentChannelParent from nsHttpChannelParent. So we can remove the interface that allowed to do so.

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

--HG--
rename : netwerk/base/nsICrossProcessSwitchChannel.idl => netwerk/base/nsIProcessSwitchRequestor.idl
extra : moz-landing-system : lando
2019-09-20 04:09:48 +00:00
Jean-Yves Avenard 7cdc8e0a68 Bug 1575744 - P7. Promisify SendCrossProcessRedirect to avoid needing PHttpChannel to get a response. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D46163

--HG--
extra : moz-landing-system : lando
2019-09-21 11:14:49 +00:00
Bogdan Tara bee28f01d7 Backed out 8 changesets (bug 1575744) for HttpChannelParent related assertion failures
Backed out changeset af61675dd488 (bug 1575744)
Backed out changeset bf794b9373c8 (bug 1575744)
Backed out changeset 39ffb74d2e12 (bug 1575744)
Backed out changeset c1547b3df672 (bug 1575744)
Backed out changeset 382ee8672027 (bug 1575744)
Backed out changeset 5abb38484f11 (bug 1575744)
Backed out changeset d5244c1bbfe8 (bug 1575744)
Backed out changeset c74b81debf73 (bug 1575744)

--HG--
rename : netwerk/base/nsIProcessSwitchRequestor.idl => netwerk/base/nsICrossProcessSwitchChannel.idl
2019-09-20 06:58:44 +03:00
Jean-Yves Avenard 1c9ba44fc0 Bug 1575744 - P8. Remove no longer necessary interface. r=mayhemer
Thanks to the promisifying of SendCrossProcessRedirect we no longer needs callback to DocumentChannelParent from nsHttpChannelParent. So we can remove the interface that allowed to do so.

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

--HG--
rename : netwerk/base/nsICrossProcessSwitchChannel.idl => netwerk/base/nsIProcessSwitchRequestor.idl
extra : moz-landing-system : lando
2019-09-18 13:17:05 +00:00
Jean-Yves Avenard 99df1db827 Bug 1575744 - P7. Promisify SendCrossProcessRedirect to avoid needing PHttpChannel to get a response. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D46163

--HG--
extra : moz-landing-system : lando
2019-09-18 13:14:30 +00:00
Ehsan Akhgari d11436d012 Bug 1575302 - Remove OptionalPrincipalInfo; r=barret
Differential Revision: https://phabricator.services.mozilla.com/D45565

--HG--
extra : moz-landing-system : lando
2019-09-11 20:36:06 +00:00
Daisuke Akatsuka a65bd31ef9 Bug 1572933: Introduce an attribute to raise the cache priority. r=pbro,mayhemer
For now, when we turn on `disable cache` switch in DevTools[1], web page loads
the contents without using the cache. Furthermore, DevTools as well comes to
load the contents DevTools inspects without using the cache. And, if the loaded
contents from the web page and DevTools was different, becomes impossible to
inspect the content correctly.
Thus, in order to make DevTools refer the same content the web page loaded,
makes DevTools load the contents inspecting from the cache at first, no matter
if disables the switch or not.

When turns on disable cache in DevTools, `LOAD_BYPASS_CACHE` flag is set into
`loadFlags` in the `docshell`.[2] The other hand, the content DevTools inspects
is loaded from a channel DevTools creates with `LOAD_FROM_CACHE` flag.[3]
However, because this channel is belong to same `loadGroup` of the `docshell`,
`LOAD_BYPASS_CACHE` is inherited and is choosen even if `LOAD_FROM_CACHE` is set.
Thus, in this patch, we introduce an attribute `preferCacheLoadOverBypass`
which raises the priority for `LOAD_FROM_CACHE` above `LOAD_BYPASS_CACHE` and
`LOAD_BYPASS_LOCAL_CACHE`.

[1] https://developer.mozilla.org/en-US/docs/Tools/Settings#Advanced_settings
[2] https://searchfox.org/mozilla-central/source/devtools/server/actors/targets/browsing-context.js#1227
[3] https://searchfox.org/mozilla-central/source/devtools/shared/DevToolsUtils.js#542-544

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

--HG--
extra : moz-landing-system : lando
2019-09-09 00:57:05 +00:00