Commit graph

188 commits

Author SHA1 Message Date
Christoph Kerschbaumer
026a7442f3 Bug 1636900: Remove TYPE_XBL from nsIContentPolicy. r=remote-protocol-reviewers,emilio,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D74835
2020-05-13 06:53:28 +00:00
Dana Keeler
e8ebc73d50 Bug 1630038 - remove HPKP entirely r=kjacobs,bbeurdouche
This removes processing of HTTP Public Key Pinning headers, remotely modifying
pinning information, and using cached pinning information, all of which was
already disabled in bug 1412438. Static pins that ship with the browser are
still enforced.

Differential Revision: https://phabricator.services.mozilla.com/D73352
2020-05-06 22:57:50 +00:00
Ian Moody
011b59d595 Bug 1536556 - Replace raw thrown Cr.ERRORs with Components.Exception. r=mossop,remote-protocol-reviewers,marionette-reviewers,whimboo,necko-reviewers,geckoview-reviewers,valentin,agi
Raw Cr.ERROR don't get stack information, same as throwing JS literals instead
of `new Error()`s.

This was done automatically with a new eslint rule that will be introduced in
the next commit.  One instance of a raw Cr.ERROR was not replaced since it is
used in a test that specifically checks the preservation of raw Cr values in
XPCJS.  The rule will be disabled for that instance.

Differential Revision: https://phabricator.services.mozilla.com/D28073
2020-05-05 17:41:36 +00:00
Perry Jiang
5846eeaf94 Bug 1595197 - fix StreamFilter redirect handling r=zombie,robwu
We need to disconnect the stream filter on redirect and allow the extension
to create a new filter.  However, we also must always retain the channel
provided to us in onStartRequest, otherwise onStop fails.  The request passed
to onStartRequest is always the right channel.

Differential Revision: https://phabricator.services.mozilla.com/D53187
2020-04-29 19:42:25 +00:00
Rob Wu
b6d9307bbc Bug 1631933 - Drop support for data:-URLs in webRequest r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D71991
2020-04-24 19:50:38 +00:00
tobias
a313e53da8 Bug 1462989 - Force merging of Content-Security-Policy header r=mixedpuppy
Headers that are not present in the original request but are added by two or
more competing extensions are not merged, but only one of the changes is
applied. Since this causes issues with privacy and security enhancing
extensions trying to tighten up CSP, this introduces a special case to
explicitly always merge the CSP header.

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

--HG--
extra : moz-landing-system : lando
2020-04-15 09:35:35 +00:00
Daniel Varga
c26509d4d6 Backed out 2 changesets (bug 1462989) for causing xpcshell failures at components/extensions/test/xpcshell/test_ext_webRequest_cached.js
CLOSED TREE

Backed out changeset 1487aaf8ccd2 (bug 1462989)
Backed out changeset 60f81cfd0d4f (bug 1462989)
2020-04-15 03:26:57 +03:00
tobias
26a59a3e6d Bug 1462989 - Force merging of Content-Security-Policy header r=mixedpuppy
Headers that are not present in the original request but are added by two or
more competing extensions are not merged, but only one of the changes is
applied. Since this causes issues with privacy and security enhancing
extensions trying to tighten up CSP, this introduces a special case to
explicitly always merge the CSP header.

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

--HG--
extra : moz-landing-system : lando
2020-04-13 15:32:08 +00:00
Sebastian Streich
f0d375bb5a Bug 1626928 - Remove nsIPrincipal Geturi in ChannelWrapper.cpp r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D69369

--HG--
extra : moz-landing-system : lando
2020-04-14 12:13:25 +00:00
Shane Caraveo
f512a77b66 Bug 1530408 fix data race setting StreamFilter disconnected r=zombie
mDisconnected should only be changed on the main thread.

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

--HG--
extra : moz-landing-system : lando
2020-04-10 19:03:24 +00:00
Shane Caraveo
587f136929 Bug 1530408 disable alt-data if possible when creating a StreamFilter r=valentin,zombie
If an extension creates a stream filter early enough, we can
disable the use of the alt-data cache allowing the extension to properly
handle filtering.

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

--HG--
extra : moz-landing-system : lando
2020-04-11 00:19:07 +00:00
Shane Caraveo
346b324d9d Bug 1530408 disconnect streamfilter and send error if using cached alt-data in request r=valentin,zombie
If the script byte cache is bypassing the normal http cache, we do not want to
offer the ability to an extension to change the cache data.

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

--HG--
extra : moz-landing-system : lando
2020-04-11 00:18:16 +00:00
Matt Woodrow
b12eb1fc01 Bug 1628766 - Don't emit a manual OnStopRequest from StreamFilterParent if we're currently disconnecting. r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D70574

--HG--
extra : moz-landing-system : lando
2020-04-10 23:04:59 +00:00
Matt Woodrow
0be8d35abb Bug 1597159 - Make sure StreamFilterParent emits an OnStopRequest if we fail to forward it to the child. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D69317

--HG--
extra : moz-landing-system : lando
2020-04-09 07:03:51 +00:00
Matt Woodrow
393a68bda5 Bug 1597159 - Promisify CreateStreamFilter. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D64697

--HG--
extra : moz-landing-system : lando
2020-04-09 07:02:34 +00:00
Brindusan Cristian
21cc9ecac2 Backed out 3 changesets (bug 1597159) for build bustages on netwerk/ipc/target-objects. CLOSED TREE
Backed out changeset 2dd2598b3edb (bug 1597159)
Backed out changeset 0ad16f200740 (bug 1597159)
Backed out changeset 927e82a323c6 (bug 1597159)
2020-04-09 07:12:47 +03:00
Matt Woodrow
f96ad8ca51 Bug 1597159 - Make sure StreamFilterParent emits an OnStopRequest if we fail to forward it to the child. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D69317

--HG--
extra : moz-landing-system : lando
2020-04-09 02:55:26 +00:00
Matt Woodrow
476f9a4293 Bug 1597159 - Promisify CreateStreamFilter. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D64697

--HG--
extra : moz-landing-system : lando
2020-04-09 02:54:23 +00:00
Noemi Erli
4d435eafcc Backed out 3 changesets (bug 1530408) for causing xpcshell failures in test_ext_webRequest_filterResponseData.js
Backed out changeset 365c4d5fe9b0 (bug 1530408)
Backed out changeset 77bb11a76b33 (bug 1530408)
Backed out changeset 3c76ac7b3965 (bug 1530408)
2020-04-08 12:04:10 +03:00
Shane Caraveo
fa28f2689e Bug 1623208 run channel cancel on main thread in streamfilter r=kershaw
Differential Revision: https://phabricator.services.mozilla.com/D69650

--HG--
extra : moz-landing-system : lando
2020-04-06 22:24:37 +00:00
Shane Caraveo
1b587aa1cf Bug 1530408 disable alt-data if possible when creating a StreamFilter r=valentin,zombie
If an extension creates a stream filter early enough, we can
disable the use of the alt-data cache allowing the extension to properly
handle filtering.

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

--HG--
extra : moz-landing-system : lando
2020-04-07 19:06:07 +00:00
Shane Caraveo
1ff0346397 Bug 1530408 disconnect streamfilter and send error if using cached alt-data in request r=valentin,zombie
If the script byte cache is bypassing the normal http cache, we do not want to
offer the ability to an extension to change the cache data.

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

--HG--
extra : moz-landing-system : lando
2020-04-03 18:55:41 +00:00
Andreas Farre
25ca8d7890 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

--HG--
extra : moz-landing-system : lando
2020-04-07 15:17:47 +00:00
Andreas Farre
63e21eec70 Bug 1620594 - Part 1: Rework NS_ReleaseOnMainThreadSystemGroup. r=nika
To be able to remove SystemGroup, NS_ReleaseOnMainThreadSystemGroup
needs to have its dependency on SystemGroup removed. Since all
releases using SystemGroup would've released on the main thread anyway
we can safely replace NS_ReleaseOnMainThreadSystemGroup with
NS_ReleaseOnMainThread.

Depends on D64390

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

--HG--
extra : moz-landing-system : lando
2020-04-07 15:16:23 +00:00
Emilio Cobos Álvarez
4b9fdf3d73 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

--HG--
extra : moz-landing-system : lando
2020-04-06 18:57:36 +00:00
Cosmin Sabou
d557e2ed22 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
97872f2fee 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

--HG--
extra : moz-landing-system : lando
2020-04-06 16:00:43 +00:00
Andrew Swan
4322e4d9e2 Bug 1625006 Add profiler markers for blocking webRequest listeners r=mixedpuppy,gerald
Differential Revision: https://phabricator.services.mozilla.com/D68278

--HG--
extra : moz-landing-system : lando
2020-04-01 16:23:53 +00:00
Andrew Swan
911c6504b2 Bug 1625006 Update listener names in HttpObserverManager r=mixedpuppy
Make the names of the data structures used inside HttpObserverManager
match the webRequest event names.

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

--HG--
extra : moz-landing-system : lando
2020-04-01 13:16:02 +00:00
Rob Wu
e84d5c8831 Bug 1621935 - Allow webRequest to see subresource requests in local files r=mixedpuppy
And remove the explicit "baseURL" origin check. This check was meant to
ensure that extensions can always intercept requests that it generated,
but changed in https://hg.mozilla.org/mozilla-central/rev/cd219dd096 by
accident to allowing access to the real `jar:`/`file:`-URL that backs
the `moz-extension:`-protocol handler.

That mistake did not break functionality, because the check was
redundant: the `moz-extension:`-origin is already explicitly added to
the internal set of host permissions of an extension. This scenario is
covered by the existing test_ext_webRequest_from_extension_page.js test.

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

--HG--
extra : moz-landing-system : lando
2020-03-24 18:58:46 +00:00
Simon Giesecke
8ad76c7e47 Bug 1613985 - Use default for equivalent-to-default constructors/destructors in toolkit. r=mossop
Depends on D66008

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

--HG--
extra : moz-landing-system : lando
2020-03-10 08:48:24 +00:00
Liang-Heng Chen
528a1c5e71 Bug 1618980 - clear RequestSize/ResponseSize cache; r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D64812

--HG--
extra : moz-landing-system : lando
2020-02-28 23:08:48 +00:00
Kris Maglione
c31aa68fb4 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

--HG--
extra : moz-landing-system : lando
2020-02-25 19:44:39 +00:00
Shane Caraveo
972d50bba2 Bug 1589494 make webrequest urlclassification non-privileged r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D61488

--HG--
extra : moz-landing-system : lando
2020-02-04 23:35:16 +00:00
Edgar Chen
9e846bd48a bug 1610296 - Rename TypedArray_base::ComputeLengthAndData to TypedArray_base::ComputeState; r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D60514

--HG--
extra : moz-landing-system : lando
2020-01-23 03:22:06 +00:00
Shane Caraveo
4d3b7a6d20 Bug 1604618 support request cancel reason in webrequest r=rpl,Honza
Support cancel reason so devtools, download panel, etc. can understand that an extension cancelled a request.

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

--HG--
extra : moz-landing-system : lando
2020-01-13 20:30:26 +00:00
Valentin Gosu
c7d9b630cb 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

--HG--
extra : moz-landing-system : lando
2020-01-07 20:20:38 +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
Bogdan Tara
80377e90ee Backed out 6 changesets (bug 1552176) for causing Hazard bustages CLOSED TREE
Backed out changeset c79b90bae420 (bug 1552176)
Backed out changeset 4b970cc771ca (bug 1552176)
Backed out changeset de7aa0eaf4c8 (bug 1552176)
Backed out changeset c8e692a40cd3 (bug 1552176)
Backed out changeset 68882d1eccac (bug 1552176)
Backed out changeset 692e5e51e19e (bug 1552176)
2019-11-11 12:11:36 +02:00
Valentin Gosu
4fe6130ec3 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

--HG--
extra : moz-landing-system : lando
2019-11-10 17:11:41 +00:00
Bogdan Tara
8f38f4a3fb Backed out 6 changesets (bug 1552176) for bustages complaining about ServiceWorkerManager.cpp CLOSED TREE
Backed out changeset bff9110e434e (bug 1552176)
Backed out changeset ac8f8a6dbd98 (bug 1552176)
Backed out changeset 8dd630e7534a (bug 1552176)
Backed out changeset 7ce9e220cdb9 (bug 1552176)
Backed out changeset ee9911acfcd4 (bug 1552176)
Backed out changeset 652b3bd6848d (bug 1552176)
2019-11-08 22:18:05 +02:00
Valentin Gosu
adfeaf25f5 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

--HG--
extra : moz-landing-system : lando
2019-11-08 17:13:05 +00:00
Perry Jiang
cdf120ce01 Bug 1587960 - Replace StreamListenerParent's channel on internal redirects r=asuth,mattwoodrow,kmag
Differential Revision: https://phabricator.services.mozilla.com/D52101

--HG--
extra : moz-landing-system : lando
2019-11-07 23:56:47 +00:00
Matt Woodrow
8ad1e883c8 Bug 1590898 - Forward stream filter creation requests across PDocumentChannel. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D50898

--HG--
extra : moz-landing-system : lando
2019-11-03 22:15:48 +00:00
Noemi Erli
853acdf360 Backed out 5 changesets (bug 1552176) for causing multiple build bustages CLOSED TREE
Backed out changeset 203060e4af95 (bug 1552176)
Backed out changeset b52f0ff800c8 (bug 1552176)
Backed out changeset 9f8d159fe252 (bug 1552176)
Backed out changeset 751b518e08fa (bug 1552176)
Backed out changeset a11ffd474c0c (bug 1552176)
2019-11-02 23:20:28 +02:00
Valentin Gosu
5528771952 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

--HG--
extra : moz-landing-system : lando
2019-11-02 20:42:42 +00:00
Junior Hsu
e2e1ec4d40 Bug 1545423 - P4 remove privileged restriction r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D51169

--HG--
extra : moz-landing-system : lando
2019-10-31 03:58:17 +00:00
Junior Hsu
dd1a30ac91 Bug 1545423 - P2 web request data API implementation r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D50405

--HG--
extra : moz-landing-system : lando
2019-10-31 00:50:47 +00:00
Andreea Pavel
9deb4ea93b Backed out 4 changesets (bug 1545423) for failing test_ext_activityLog.html on a CLOSED TREE
Backed out changeset 0abbf10b68b0 (bug 1545423)
Backed out changeset 35758baf44e3 (bug 1545423)
Backed out changeset 3ae45f3be2e1 (bug 1545423)
Backed out changeset 9f7f0e4c65da (bug 1545423)
2019-10-31 02:16:24 +02:00
Junior Hsu
c768e5aa1f Bug 1545423 - P4 remove privileged restriction r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D51169

--HG--
extra : moz-landing-system : lando
2019-10-30 23:12:49 +00:00