Commit Graph

842 Commits

Author SHA1 Message Date
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
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
Honza Bambas
52a8b03f3d Bug 1605895 - Add a diagnostic assertion when an http channel on the child process loading CSS does not notify OnStopRequest before being destroyed, r=michal
Differential Revision: https://phabricator.services.mozilla.com/D68025
2020-04-06 15:12:15 +00:00
Mihai Alexandru Michis
64e7ffad08 Backed out changeset 30fe730b5ab1 (bug 1605895) for causing mochitest failures in HttpChannelChild
CLOSED TREE
2020-04-02 20:37:12 +03:00
Honza Bambas
345cd78c92 Bug 1605895 - Add a diagnostic assertion when an http channel on the child process loading CSS does not notify OnStopRequest before being destroyed, r=michal
Differential Revision: https://phabricator.services.mozilla.com/D68025
2020-04-02 15:53:54 +00:00
Sebastian Streich
0adae91a06 Bug 1622042 - Remove nsContentUtils::GetAsciiOrigin r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D66634
2020-03-26 13:20:35 +00:00
Tim Huang
bed4352713 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
2020-03-25 13:51:05 +00:00
Andrea Marchesini
6df5fba02f Bug 1437057 - Expose the origin of a cookie to JS, r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D67589
2020-03-24 16:47:57 +00:00
Andrea Marchesini
a6f6811427 Bug 1585306 - HTTP channels must check if the browsing context is discarded, r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D66760
2020-03-19 16:23:40 +00:00
Andrea Marchesini
a758b7a812 Bug 1585306 - nsILoadGroup observes last-pb-context-exit to monitor the browsing context, r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D66745
2020-03-19 16:24:21 +00:00
Stefan Hindli
bb21fc71f7 Backed out 4 changesets (bug 1622042) for causing AddonInstallException: Could not install add-on: c:\users\task_1584560140\appdata\local\temp\tmpbg9_h7.zip: ERROR_FILE_ACCESS: There was an error accessing the filesystem. CLOSED TREE
Backed out changeset 929043330599 (bug 1622042)
Backed out changeset b08cdd075e20 (bug 1622042)
Backed out changeset ca87f1c6b90b (bug 1622042)
Backed out changeset 27dbbb7cd590 (bug 1622042)
2020-03-18 22:49:23 +02:00
Sebastian Streich
2843e0e5b8 Bug 1622042 - Remove nsContentUtils::GetAsciiOrigin r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D66634
2020-03-18 16:00:53 +00:00
Cosmin Sabou
48ff1e921d Backed out 4 changesets (bug 1622042) for causing build bustages on nsContentUtils.cpp. CLOSED TREE
Backed out changeset dc7af5abb8de (bug 1622042)
Backed out changeset 16e3b4a1fefc (bug 1622042)
Backed out changeset f60b16588dad (bug 1622042)
Backed out changeset 4193aea26e28 (bug 1622042)
2020-03-17 20:38:35 +02:00
Sebastian Streich
5dcdec5d06 Bug 1622042 - Remove nsContentUtils::GetAsciiOrigin r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D66634
2020-03-17 17:11:52 +00:00
anjali1903
0e373a201d Bug 1621251 Replace NS_ADDREF(*var = other) with *var = do_AddRef(other).take() in /netwerk r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D66818
2020-03-17 15:05:26 +00:00
Chris Fronk
5f4d7b6abf Bug 1143478 - Rename mozilla::Pair to CompactPair. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D64511
2020-03-17 12:42:12 +00:00
Matt Woodrow
2efb1368a8 Bug 1620875 - Don't duplicate loadFlags in the http specific config as well as the generic config for DocumentChannel replacement. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D65922
2020-03-16 00:56:03 +00:00
shindli
acf53819f5 Backed out changeset a08637fb30c8 (bug 1143478) for causing bustages in /builds/worker/checkouts/gecko/ipc/mscom/Registration.cpp CLOSED TREE 2020-03-11 14:30:54 +02:00
Chris Fronk
3949093799 Bug 1143478 - Rename mozilla::Pair to CompactPair. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D64511
2020-03-11 12:18:13 +00:00
Christoph Kerschbaumer
723c0e80a9 Bug 1620924: Remove null checks for loadinfo within nsHttpBaseChannel. r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D65933
2020-03-10 11:37:39 +00:00
Ehsan Akhgari
8e0530893e Bug 1620322 - Part 3: Move MaybeGetDocumentURIBeingLoaded to AntiTrackingUtils; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D65751
2020-03-09 23:36:39 +00:00
Narcis Beleuzu
422807b8e0 Backed out 8 changesets (bug 1620322) for bustages on nsContentSink.cpp . CLOSED TREE
Backed out changeset f41739c64dff (bug 1620322)
Backed out changeset be942a7f329e (bug 1620322)
Backed out changeset a916987c7c71 (bug 1620322)
Backed out changeset ead3484ffb5f (bug 1620322)
Backed out changeset 4e1e8b9afa1a (bug 1620322)
Backed out changeset 473bba698e5a (bug 1620322)
Backed out changeset 0e5e5d41597d (bug 1620322)
Backed out changeset 31b24d79db3d (bug 1620322)
2020-03-09 22:18:36 +02:00
Ehsan Akhgari
b669dd7ad6 Bug 1620322 - Part 3: Move MaybeGetDocumentURIBeingLoaded to AntiTrackingUtils; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D65751
2020-03-09 18:12:28 +00:00
Noemi Erli
f3729f347c Backed out 8 changesets (bug 1620322) for causing bustages in ContentBlockingLog.cpp CLOSED TREE
Backed out changeset 3dcf513e36cb (bug 1620322)
Backed out changeset 46714855ce1d (bug 1620322)
Backed out changeset 0eb2b5f7322f (bug 1620322)
Backed out changeset 72d640fa0740 (bug 1620322)
Backed out changeset 4533bb4e5177 (bug 1620322)
Backed out changeset 659270edd419 (bug 1620322)
Backed out changeset 6802c18b1914 (bug 1620322)
Backed out changeset 60ff34db9f15 (bug 1620322)
2020-03-09 19:19:41 +02:00
Ehsan Akhgari
d948c5df3b Bug 1620322 - Part 3: Move MaybeGetDocumentURIBeingLoaded to AntiTrackingUtils; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D65751
2020-03-09 10:20:12 +00:00
sonakshi
96700be8b2 Bug 1620687 - Removing unused aURI parameter r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D65868
2020-03-09 14:33:25 +00:00
Andrea Marchesini
b93ec7d33d Bug 1619875 - Remove the remaining of the prompting code in the cookie-world, r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D65289
2020-03-04 21:25:33 +00:00
Andrea Marchesini
6fc4df5cec Bug 1619971 - Clear-site-data operations show appear in the console - part 1 - report and flush console events, r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D65243
2020-03-04 15:12:05 +00:00
Kershaw Chang
bf62f8e4fc Bug 1613873 - P1: Implementation of SimpleHttpChannel r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D61998
2020-03-03 09:31:35 +00:00
Kershaw Chang
e49913c65e Bug 1584104 - Add some information needed by parent process to nsITransportSecurityInfo r=keeler
When socket process is enabled, parent process needs some information in `CommonSocketControl`, but `CommonSocketControl` is only accessible in socket process.
This patch moves some data members from `CommonSocketControl` to `nsTransportSecurityInfo` and make it possible for parent process to get the needed data.

Differential Revision: https://phabricator.services.mozilla.com/D64084
2020-03-02 20:28:15 +00:00
Daisuke Akatsuka
5f60ac52b7 Bug 1607999: Convey User-Agent request header to a channel which is for redirection. r=dragana,ckerschb
For now, when redirecting before creating docshell, the custom user agent is not conveyed to a channel for the redirection. In this patch, fix that.

Differential Revision: https://phabricator.services.mozilla.com/D60210
2020-02-26 00:08:47 +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
Andrea Marchesini
3e42568ef3 Bug 1577040 - Part 7: Get rid of nsIClassifiedChanel::IsTrackingResource(), r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D63305
2020-02-20 07:30:30 +00:00
Andrea Marchesini
e91b2536e6 Bug 1577040 - Part 4: Get rid of nsIClassifiedChannel::IsSocialTrackingResource(), r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D63302
2020-02-20 07:29:24 +00:00
Andrea Marchesini
3409c28873 Bug 1577040 - Part 0: nsIClassifiedChannel.isThirdPartySocialTrackingResource(), r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D63298
2020-02-20 07:26:54 +00:00
Valentin Gosu
8193f10635 Bug 1607460 - Align with Cross-Origin-Opener-Policy changes r=michal
See: https://gist.github.com/annevk/6f2dd8c79c77123f39797f6bdac43f3e/f39cac7bf3a8a894059879f15c5b7b41f0195e29
The definition of the header is now:
Cross-Origin-Opener-Policy = %s"same-origin" / %s"same-origin-allow-popups" / %s"unsafe-none"; case-sensitive

Differential Revision: https://phabricator.services.mozilla.com/D60480
2020-02-18 16:39:08 +00:00
Bogdan Tara
c74233732c Backed out 2 changesets (bug 1607999) for test_fetch_cors_sw_reroute.html & test_fetch_event.html failures CLOSED TREE
Backed out changeset 3dd8004b9b6c (bug 1607999)
Backed out changeset 470e927e5f3f (bug 1607999)
2020-02-14 16:00:51 +02:00
Daisuke Akatsuka
088b2b4b72 Bug 1607999: Convey User-Agent request header to a channel which is for redirection. r=dragana
For now, when redirecting before creating docshell, the custom user agent is not conveyed to a channel for the redirection. In this patch, fix that.

Differential Revision: https://phabricator.services.mozilla.com/D60210
2020-02-14 11:55:13 +00:00
Valentin Gosu
2c00444d67 Bug 1614267 - Don't proxy URI release to the main thread for HttpBaseChannel r=kershaw
Since nsIURIs are thread safe, we don't need to proxy their release to the
main thread.

Differential Revision: https://phabricator.services.mozilla.com/D62193
2020-02-12 12:32:39 +00:00
Eric Rahm
9f1fb4c724 Bug 1610070 - Part 3: Convert the rest of netwerk/ to use UniquePtr. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D60341
2020-02-11 16:20:08 +00:00
Kershaw Chang
b9b52f3e0f Bug 1600254 - P8: Make nsIInputChannelThrottleQueue work with socket process r=dragana
The only information that devtools needs is the amount of how many bytes readed, so this patch introduces PInputChannelThrottleQueue ipdl for carrying on this information.

Differential Revision: https://phabricator.services.mozilla.com/D56710
2020-01-30 13:32:55 +00:00
Emilio Cobos Álvarez
778b011866 Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj
This was done by:

This was done by applying:

```
diff --git a/python/mozbuild/mozbuild/code-analysis/mach_commands.py b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
index 789affde7bbf..fe33c4c7d4d1 100644
--- a/python/mozbuild/mozbuild/code-analysis/mach_commands.py
+++ b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
@@ -2007,7 +2007,7 @@ class StaticAnalysis(MachCommandBase):
         from subprocess import Popen, PIPE, check_output, CalledProcessError

         diff_process = Popen(self._get_clang_format_diff_command(commit), stdout=PIPE)
-        args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format]
+        args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format, '-sort-includes']

         if not output_file:
             args.append("-i")
```

Then running `./mach clang-format -c <commit-hash>`

Then undoing that patch.

Then running check_spidermonkey_style.py --fixup

Then running `./mach clang-format`

I had to fix four things:

 * I needed to move <utility> back down in GuardObjects.h because I was hitting
   obscure problems with our system include wrappers like this:

0:03.94 /usr/include/stdlib.h:550:14: error: exception specification in declaration does not match previous declaration
0:03.94 extern void *realloc (void *__ptr, size_t __size)
0:03.94              ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/malloc_decls.h:53:1: note: previous declaration is here
0:03.94 MALLOC_DECL(realloc, void*, void*, size_t)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozilla/mozalloc.h:22:32: note: expanded from macro 'MALLOC_DECL'
0:03.94     MOZ_MEMORY_API return_type name##_impl(__VA_ARGS__);
0:03.94                                ^
0:03.94 <scratch space>:178:1: note: expanded from here
0:03.94 realloc_impl
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozmemory_wrap.h:142:41: note: expanded from macro 'realloc_impl'
0:03.94 #define realloc_impl mozmem_malloc_impl(realloc)

   Which I really didn't feel like digging into.

 * I had to restore the order of TrustOverrideUtils.h and related files in nss
   because the .inc files depend on TrustOverrideUtils.h being included earlier.

 * I had to add a missing include to RollingNumber.h

 * Also had to partially restore include order in JsepSessionImpl.cpp to avoid
   some -WError issues due to some static inline functions being defined in a
   header but not used in the rest of the compilation unit.

Differential Revision: https://phabricator.services.mozilla.com/D60327
2020-01-20 16:19:48 +00:00
Emilio Cobos Álvarez
2efdea1ee5 Bug 1609996 - Remove mozilla/Move.h. r=froydnj
rg -l 'mozilla/Move.h' | xargs sed -i 's/#include "mozilla\/Move.h"/#include <utility>/g'

Further manual fixups and cleanups to the include order incoming.

Differential Revision: https://phabricator.services.mozilla.com/D60323
2020-01-20 16:18:20 +00:00
Valentin Gosu
3776a7e5d3 Bug 1590166 - WindowGlobalChild::Create should call GetCrossOriginOpenerPolicy instead of ComputeCrossOriginOpenerPolicy r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D59360
2020-01-18 17:14:07 +00:00
Valentin Gosu
4d7851b64e Bug 1552176 - Add nsIRequest.set/getTRRMode r=dragana
* Makes it possible to selectively enable TRR for pbmode/container/window/etc

Differential Revision: https://phabricator.services.mozilla.com/D48363
2020-01-07 20:20:38 +00:00
Matt Woodrow
f816cca417 Bug 1601743 - Don't apply the referrer header to the referrer that we send back to the content process when converting a DocumentChannel into a real channel. r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D56841
2019-12-16 00:19:03 +00:00
Gabriele Svelto
f03cdb2b2d 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
2019-12-06 09:17:57 +00:00
Boris Zbarsky
2df1df0176 Bug 1517588. Use nsIPrincipal::IsSystemPrincipal instead of nsContentUtils::IsSystemPrincipal r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D53067
2019-12-05 04:44:32 +00:00
Matt Woodrow
0d7366cc20 Bug 1600211 - Disable content conversion by HttpChannelChild if we have already applied it by the time we get to HttpChannelParent::OnStartRequest. r=mayhemer
We normally get HttpChannelParent::OnStartRequest directly from nsHttpChannel::OnStartRequest, where we disable content conversion and ask the child to do it instead.

When we install a multipart converter, we defer calling HttpChannelParent::OnStartRequest until we've decoded parts, at which point content conversion is already applied to the stream.

This detects that case, and stops the child trying to do it a second time (which fails, and breaks the content).

Differential Revision: https://phabricator.services.mozilla.com/D55222
2019-12-04 03:19:26 +00:00