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

310 Коммитов

Автор SHA1 Сообщение Дата
Mike Hommey ad42c13a73 Bug 1733034 - Fix unreachable-code-return warnings in dom. r=smaug
dom/console/Console.cpp:2899:10: error: 'return' will never be executed [-Werror,-Wunreachable-code-return]
  return 0;
         ^
dom/console/Console.cpp:2955:10: error: 'return' will never be executed [-Werror,-Wunreachable-code-return]
  return 0;
         ^
dom/fetch/FetchDriver.cpp:252:10: error: 'return' will never be executed [-Werror,-Wunreachable-code-return]
  return NS_OK;
         ^~~~~

Differential Revision: https://phabricator.services.mozilla.com/D126870
2021-09-29 21:44:51 +00:00
Marian-Vasile Laza 381c254e6d Backed out 3 changesets (bug 1487113) for causing hazard bustages. CLOSED TREE
Backed out changeset 13bf04fc644f (bug 1487113)
Backed out changeset 5b7fe5d564aa (bug 1487113)
Backed out changeset 02236ccd64b4 (bug 1487113)
2021-09-17 22:58:33 +03:00
Yury Delendik b8f6bd6a71 Bug 1487113 - Add pref javascript.options.wasm_caching. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D27101
2021-09-17 12:16:24 +00:00
Yury Delendik 21eebdf064 Bug 1487113 - Use alt-data to cache stream-compiled WebAssembly modules. r=necko-reviewers,valentin,dragana
Depends on D117360

Differential Revision: https://phabricator.services.mozilla.com/D26731
2021-09-17 12:16:24 +00:00
Yury Delendik 19b0d24e7f Bug 1487113 - nsICacheInfoChannel.alternativeDataInputStream as attribute. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D117360
2021-09-17 12:16:23 +00:00
Cristian Tuns f2f6eac4d6 Backed out 3 changesets (bug 1487113) for causing mochitest failures. CLOSED TREE
Backed out changeset b20e5d76c77e (bug 1487113)
Backed out changeset b0b2b27dcb68 (bug 1487113)
Backed out changeset 9214b396eb84 (bug 1487113)
2021-09-14 17:38:32 -04:00
Yury Delendik f03ccb4ccd Bug 1487113 - Add pref javascript.options.wasm_caching. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D27101
2021-09-14 20:12:52 +00:00
Yury Delendik 564b18936f Bug 1487113 - Use alt-data to cache stream-compiled WebAssembly modules. r=necko-reviewers,valentin,dragana
Differential Revision: https://phabricator.services.mozilla.com/D26731
2021-09-14 20:12:51 +00:00
Yury Delendik 0b78665a0e Bug 1487113 - nsICacheInfoChannel.alternativeDataInputStream as attribute. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D117360
2021-09-14 20:12:51 +00:00
Eden Chuang 4ce2d06b79 Bug 1714299 - Correct the opaque response judgment for opaque response blocking. r=necko-reviewers,annevk,dragana
An opaque response should be not only cross-origin but also be request with no_cors request mode.

To filter out the request with mode Same_origin, navigate, and cors. This patch reuses the algorithm in InternalRequest/FetchDriver to decide whether a response is an opaque response.

https://searchfox.org/mozilla-central/rev/da5d08750e504f3710f7ea051327d9c311c39902/dom/fetch/InternalRequest.cpp#331
https://searchfox.org/mozilla-central/rev/da5d08750e504f3710f7ea051327d9c311c39902/dom/fetch/FetchDriver.cpp#1153,1157

Differential Revision: https://phabricator.services.mozilla.com/D117086
2021-07-02 23:11:55 +00:00
Sebastian Streich 239f9451dc Bug 1685570 Backed out changeset 92d71744323a r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D107670
2021-03-10 15:15:24 +00:00
Kershaw Chang 099352f219 Bug 1690481 - Make the fetch request fail when response is not available r=baku
Differential Revision: https://phabricator.services.mozilla.com/D103892
2021-02-23 10:22:03 +00:00
Sebastian Streich 2fdb236107 Bug 1685570 - Revert Origin-Header Changes in FetchDriver.cpp r=ckerschb
This is a partial revert of:
https://phabricator.services.mozilla.com/D80905

The regressing patch does 2 things:
- Add an origin header-implementation that fills in current blank spots, and implements global redirect tainting.
- Remove the fetchdriver origin header implementation -> which would trigger the new one to take place for those cases.

The patch did block-list moz-extension://, so we would get null-origin for extensions.
My proposal is to just revert the removal of the fetch driver changes for now.

Pro:
- the extensions get their expected origin,
- we keep filling in blank spots
- we will be handling redirects correctly even for fetch-driver set origin headers[[ https://bugzilla.mozilla.org/show_bug.cgi?id=1535795 |  which was a problem before  ]]
- it's a way smaller changeset than removing the whole patch.
Cons:
- we have one more place for now where the header is set :(

Differential Revision: https://phabricator.services.mozilla.com/D104668
2021-02-11 16:46:17 +00:00
Emilio Cobos Álvarez 40dc6e911d Bug 1685832 - Add a missing include to fix non-unified bustage.
MANUAL PUSH: bustage on a CLOSED TREE
2021-01-11 05:20:06 +01:00
Akihiko Odaki 5568524e05 Bug 1605305 - Origin header field is not set to HTTP request in cases where it is required, r=ckerschb,necko-reviewers,JuniorHsu,valentin
***

***

Differential Revision: https://phabricator.services.mozilla.com/D80905
2020-12-03 00:56:22 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Sylvestre Ledru fde06f6d21 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 17:04:01 +00:00
Butkovits Atila 964cca3198 Backed out changeset c0adbf7522dc (bug 1674637) for bustage on GMPParent.cpp. CLOSED TREE 2020-11-04 10:54:36 +02:00
Sylvestre Ledru 5f29324f60 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 08:29:00 +00:00
Jeff Walden e1ed5804d7 Bug 1660555 - Split AbortFollower::Abort into AbortFollower::RunAbortAlgorithm and AbortSignalImpl::SignalAbort functions for readability. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D92321
2020-10-22 07:42:18 +00:00
Andi-Bogdan Postelnicu 85c179d8f3 Bug 1671641 - Make `dom/fetch` buildable outside of `unified-build` environment. r=sg
Depends on D93998

Differential Revision: https://phabricator.services.mozilla.com/D94015
2020-10-21 08:00:18 +00:00
Simon Giesecke de7bab0f06 Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82325
2020-09-23 15:17:15 +00:00
Kagami Sascha Rosylight f949ec8d28 Bug 1664514 - Proper null checks in CORS/fetch r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D89960
2020-09-14 18:36:25 +00:00
Cristina Coroiu ca591bd0d6 Backed out changeset 633d2aa345a3 (bug 1664514) fro crashtest failures at dom/fetch/tests/crashtests/1664514.html on a CLOSED TREE 2020-09-14 18:18:10 +03:00
Kagami Sascha Rosylight be6889463a Bug 1664514 - Proper null checks in CORS/fetch r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D89960
2020-09-14 09:50:46 +00:00
Kershaw Chang 9959ea65a6 Bug 1648515, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D89110
2020-09-09 12:57:32 +00:00
Kershaw Chang 6c706754b3 Bug 1648515 r=baku
Differential Revision: https://phabricator.services.mozilla.com/D83513
2020-07-18 06:59:05 +00:00
Frederik Braun a7153982e8 Bug 1366973: Rename security flags to not contain DATA anymore r=geckoview-reviewers,ckerschb,snorp
Differential Revision: https://phabricator.services.mozilla.com/D83490
2020-07-15 11:20:45 +00:00
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Emilio Cobos Álvarez 6bb08bd490 Bug 1646056 - Use const references as keys instead of raw pointers for PreloadHashKey. r=mayhemer
Feels a bit more natural for the callers this way. This should have no
behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D79831
2020-06-18 14:06:34 +00:00
Emilio Cobos Álvarez 939c7c466b Bug 1642591 - Don't make referrer policy a cache miss for sub-resource {pre,}loads. r=mayhemer,tnikkel
For preload we're already effectively not using it, I think, due to
bug 1642325.

For images, this matches the spec, see earlier comments in this bug and
https://bugzilla.mozilla.org/show_bug.cgi?id=1174921#c17.  I think it
makes sense for other sub-resources to align as well.

Differential Revision: https://phabricator.services.mozilla.com/D79812
2020-06-18 14:06:20 +00:00
Honza Bambas 089a846bd0 Bug 1642303 - Keep channel of FetchPreloader even after the load has finished to let preload consumers use that channel early after opening, r=baku
Differential Revision: https://phabricator.services.mozilla.com/D78729
2020-06-10 14:21:56 +00:00
Junior Hsu c967db3c67 Bug 1638513 - P2 let nsIHttpChannel implement shouldStripRequestBodyHeader, r=valentin,necko-reviewers
We need to extract the common method into the idl since the connection between necko
and XHR is idl. Need to import the whole necko if we do something like
`#include "HttpBaseChannel.h"

Differential Revision: https://phabricator.services.mozilla.com/D78830
2020-06-09 18:20:15 +00:00
Eden Chuang 16b5f23697 Bug 1532287 - P2 Propagate loading document/worker's COEP to nsHttpChannel through nsILoadInfo r=necko-reviewers,valentin,JuniorHsu
Currently, the worker's COEP is saved in WorkerPrivate and not be respected when loading resources in workers.
This patch adds an attribute loadingEmbedderPolicy in nsILoadInfo, which indicates the COEP header the loading must be respected.

The default value of loadingEmbedderPolicy is nsILoadInfo::EMBEDDER_POLICY_NULL.
loadingEmbedderPolicy is initialized with the COEP of the BrowsingContext used for creating LoadInfo.
And it could be set to other value when fetch in workers.

Differential Revision: https://phabricator.services.mozilla.com/D73690
2020-05-19 12:50:39 +00:00
Honza Bambas 7a64bc8d9b Bug 1618543 - Let `fetch()` use "fetch" preloads, r=baku
Differential Revision: https://phabricator.services.mozilla.com/D74899
2020-05-18 12:18:14 +00:00
Junior Hsu c9b2009b07 Bug 1632045 - strip Content-Type and related headers for POST->GET XHR, r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D74771
2020-05-13 17:05:06 +00:00
Simon Giesecke 32076b1063 Bug 1627892 - Make InternalRequest derive from SafeRefCounted. r=dom-workers-and-storage-reviewers,perry
Differential Revision: https://phabricator.services.mozilla.com/D69958
2020-05-11 12:10:53 +00:00
Eric Rahm 1fca90d61d Bug 1626441 - Remove nsAutoPtr usage from dom/fetch. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D69112

--HG--
extra : moz-landing-system : lando
2020-04-03 21:05:07 +00:00
Tim Huang 04d44bae12 Bug 1616570 - Part 1: Rename CookieSettings to CookieJarSettings. r=Ehsan
Given that we are going to add ContentBlockingAllowList in
CookieSettings, so CookieSettings will be responsible for more stuff than the
cookie behavior and cookie permission. We should use a proper name to
reflect the purpose of it. The name 'CookieSettings' is misleading that
this is only for cookie related stuff. So, we decide to rename
'CookieSettins' to 'CookieJarSettings' which serves better meaning here.

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

--HG--
rename : netwerk/cookie/CookieSettings.cpp => netwerk/cookie/CookieJarSettings.cpp
rename : netwerk/cookie/nsICookieSettings.idl => netwerk/cookie/nsICookieJarSettings.idl
extra : moz-landing-system : lando
2020-03-04 08:59:08 +00:00
Simon Giesecke b50347f917 Bug 1611415 - Prefer using std::move over forget. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-13 14:38:48 +00:00
shindli 91aa0518dd Backed out changeset 0c982bc69cb3 (bug 1611415) for causing build bustages in /builds/worker/workspace/build/src/obj-firefox/dist/include/nsCOMPtr CLOSED TREE 2020-02-12 20:13:29 +02:00
Simon Giesecke f604a47fa5 Bug 1611415 - Applied FixItHints from mozilla-non-std-move. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-12 17:24:41 +00:00
Junior Hsu 4afe29f65d Bug 1530230 - strip request-body-header for POST to GET redirection in fetch r=valentin
Spec change brief:
A request-body-header name is a header name that is a byte-case-insensitive match for one of:
  - Content-Encoding
  - Content-Language
  - Content-Location
  - Content-Type

If one of the following is true
1. actualResponse ’s status is 301 or 302 and request ’s method is POST
1. actualResponse ’s status is 303 and request ’s method is not GET or HEAD
then set then:
1. Set request ’s method to GET and request ’s body to null.
1. For each headerName of request-body-header name , delete headerName from request ’s header list .

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

--HG--
extra : moz-landing-system : lando
2019-12-10 17:41:43 +00:00
Gabriele Svelto ace6d1063f Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ 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/D55442

--HG--
extra : moz-landing-system : lando
2019-12-06 09:24:56 +00:00
Dorel Luca a381d5c96d Backed out changeset f6e53d1c6518 (bug 1600545) for Android build bustage. CLOSED TREE 2019-12-04 17:32:27 +02:00
Gabriele Svelto bc9290f767 Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ 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/D55442

--HG--
extra : moz-landing-system : lando
2019-12-04 15:01:19 +00:00
Emilio Cobos Álvarez 718534d4bf Bug 1599843 - FetchDriver::FinishOnStopRequest is infallible. r=baku
Depends on D54992

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

--HG--
extra : moz-landing-system : lando
2019-11-27 18:45:52 +00:00
Ehsan Akhgari 03fa12d685 Bug 1593162 - Remove the expired telemetry probes added in bug 1127552; r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D51335

--HG--
extra : moz-landing-system : lando
2019-11-01 13:43:15 +00:00
Ehsan Akhgari 8d9c7bc2c5 Bug 1589953 - Initialize `read` in AlternativeDataStreamListener::OnDataAvailable(); r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D49849

--HG--
extra : moz-landing-system : lando
2019-10-20 19:29:06 +00:00
Edgar Chen 5bc0854d2b Bug 1578355 - Part 1: Move user-activation code from EventStateManager to UserActivation; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D45168

--HG--
extra : moz-landing-system : lando
2019-09-20 20:51:25 +00:00