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

69 Коммитов

Автор SHA1 Сообщение Дата
Tim Huang d6dbe99f94 Bug 1899138 - Set the IsInThirdPartyContext for the loadInfo of the channel that loads worker scripts. r=asuth
To set the IsInThirdPartyContext bit to the channel's loadInfo, we
duduce whether the channel is foreign by looking into the partitionKey
of the worker. If the partitionKey of the OAs of the worker's principal
is not empty, the worker should be foreign, so as to the channel.

Differential Revision: https://phabricator.services.mozilla.com/D211757
2024-05-29 08:57:47 +00:00
Emilio Cobos Álvarez e4ddf24147 Bug 1887719 - More consistently use UTF8String/nsCString for URLs. r=necko-reviewers,webidl,anti-tracking-reviewers,places-reviewers,jari,kershaw,janv,smaug,hsivonen
Sorry for the massive patch but I found it hard to split without
introducing a bunch of copies around...

This mostly makes necko and DOM agree on which strings to use, which
should result on less copies and conversions.

Differential Revision: https://phabricator.services.mozilla.com/D205601
2024-04-04 11:49:57 +00:00
Benjamin VanderSloot d3ef19887a Bug 1876574 - Add SameSite bit to partition-key origin attribute for first-party partitioning - r=timhuang
This patch is a no-op for observable functionality. All it does is add a bit to the partitionKey for OA, and then adds plumbing to be able to set it, and where it is required, sets it to false.
This is serialized identically to the absence of the bit, so nothing changes at all.

Differential Revision: https://phabricator.services.mozilla.com/D203155
2024-04-02 18:53:25 +00:00
Cristian Tuns 3ba835953e Backed out 6 changesets (bug 1876574, bug 1876575) for causing multiple failures in TestGetPrincipalCookieBehavior5 CLOSED TREE
Backed out changeset f00e9fde550f (bug 1876575)
Backed out changeset ca1c6f8819f7 (bug 1876575)
Backed out changeset d65ac05bd9f8 (bug 1876575)
Backed out changeset 5dcfe3aa8497 (bug 1876575)
Backed out changeset 9ae9252761ac (bug 1876575)
Backed out changeset 704e94d28ad7 (bug 1876574)
2024-04-02 09:58:52 -04:00
Benjamin VanderSloot 880a6720e4 Bug 1876574 - Add SameSite bit to partition-key origin attribute for first-party partitioning - r=timhuang
This patch is a no-op for observable functionality. All it does is add a bit to the partitionKey for OA, and then adds plumbing to be able to set it, and where it is required, sets it to false.
This is serialized identically to the absence of the bit, so nothing changes at all.

Differential Revision: https://phabricator.services.mozilla.com/D203155
2024-04-02 12:50:00 +00:00
Stanca Serban 23caed9eac Backed out 6 changesets (bug 1876574, bug 1876575) for causing multiple failures. CLOSED TREE
Backed out changeset 8c7a9f405031 (bug 1876575)
Backed out changeset 49739f9ec590 (bug 1876575)
Backed out changeset 1c49f0c3b677 (bug 1876575)
Backed out changeset 1ca7a0f27bc0 (bug 1876575)
Backed out changeset bfa9862e3480 (bug 1876575)
Backed out changeset 58576ed7eb22 (bug 1876574)
2024-03-29 20:52:30 +02:00
Benjamin VanderSloot 6e1646cf81 Bug 1876574 - Add SameSite bit to partition-key origin attribute for first-party partitioning - r=timhuang
This patch is a no-op for observable functionality. All it does is add a bit to the partitionKey for OA, and then adds plumbing to be able to set it, and where it is required, sets it to false.
This is serialized identically to the absence of the bit, so nothing changes at all.

Differential Revision: https://phabricator.services.mozilla.com/D203155
2024-03-29 17:12:12 +00:00
Sandor Molnar 09e7cbd0b7 Backed out 6 changesets (bug 1876575, bug 1876574) for causing build bustages @ toolkit/components/resistfingerprinting/nsRFPService.cpp CLOSED TREE
Backed out changeset 455ce831c73c (bug 1876575)
Backed out changeset 4fa3fbf3a3ae (bug 1876575)
Backed out changeset ac4c41cb3b67 (bug 1876575)
Backed out changeset 15e06d10788e (bug 1876575)
Backed out changeset dcd6bbea816a (bug 1876575)
Backed out changeset cc547125fda9 (bug 1876574)
2024-03-29 16:29:47 +02:00
Benjamin VanderSloot 998c4499bd Bug 1876574 - Add SameSite bit to partition-key origin attribute for first-party partitioning - r=timhuang
This patch is a no-op for observable functionality. All it does is add a bit to the partitionKey for OA, and then adds plumbing to be able to set it, and where it is required, sets it to false.
This is serialized identically to the absence of the bit, so nothing changes at all.

Differential Revision: https://phabricator.services.mozilla.com/D203155
2024-03-29 13:11:26 +00:00
Tooru Fujisawa dbc77b97e8 Bug 1837964 - Part 2: Use UniquePtr with explicit free policy in ScriptLoader::{ConvertToUTF16,ConvertToUTF8} and their consumers. r=smaug
Remove raw pointer variant of ScriptLoader::{ConvertToUTF16,ConvertToUTF8} to
make it clearer how the buffer is allocated and how it should be freed.

The consumer in ServiceWorkerScriptCache expects the buffer allocated with
malloc, but given js_malloc and malloc are identical in browser, it also
uses JS::FreePolicy.

Differential Revision: https://phabricator.services.mozilla.com/D181204
2023-07-06 09:37:18 +00:00
Nika Layzell 9f4d22f4e0 Bug 1826206 - Require nsISerialEventTarget for RetargetDeliveryTo, r=necko-reviewers,valentin
This avoids potential issues where multiple OnDataAvailable callbacks or
similar could theoretically be called concurrently on different
StreamTransportService threads when targeting the STS - these cases will
now target a TaskQueue on the STS instead, structurally ensuring serial
execution.

Differential Revision: https://phabricator.services.mozilla.com/D179984
2023-06-07 14:48:38 +00:00
Kershaw Chang d164608d66 Bug 1760580 - P2: Provide a reason when request is cancelled with NS_BINDING_ABORTED, r=necko-reviewers,media-playback-reviewers,valentin,chunmin
Differential Revision: https://phabricator.services.mozilla.com/D156071
2022-09-08 09:11:19 +00:00
Kagami Sascha Rosylight 0e60dc53fb Bug 1768189 - Part 29: Apply modernize-concat-nested-namespaces to dom/serviceworkers/ServiceWorkerPrivate.cpp ... r=andi
Depends on D145762

Differential Revision: https://phabricator.services.mozilla.com/D145763
2022-05-09 20:41:14 +00:00
Kagami Sascha Rosylight 4691a13522 Bug 1734243 - Part 3: Use SetAnyPromiseIsHandled in ServiceWorkerScriptCache r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D139592
2022-02-25 20:11:41 +00:00
Matthew Gaudet bc10b96605 Bug 1748888 - Add ErrorResult parameter to PromiseNativeHandler callbacks r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D136423
2022-01-20 19:11:39 +00:00
Tim Huang 8f9ee3f20e Bug 1731990 - Part 4: Populate the partitionKey from the prinicpal of the service worker in ServiceWorkerScriptCache. r=asuth
This patch changes ServiceWorkerScriptCache to use the principal of the
service worker to populate the partitionKey to the cookieJarSettings.
The service workers are using foreign partitioned principal. This means
it will contain a correct partitionKey if it's in a third-party context.
So we can use it to populate the partitionKey. In the first-party
context, we can use the script uri to get the partionKey, which is the
original approach.

Differential Revision: https://phabricator.services.mozilla.com/D128734
2021-11-25 13:11:35 +00:00
Eden Chuang 44f5b17747 Bug 1577346 - P3 Make InternalResponse be SafeRefcounted. r=dom-worker-reviewers,ytausky
Depends on D126243

Differential Revision: https://phabricator.services.mozilla.com/D126244
2021-11-08 13:29:32 +00:00
Tooru Fujisawa cc92ef732d Bug 1708448 - Move property and element functions into js/public/PropertyAndElement.h. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D119619
2021-07-13 11:52:42 +00:00
Tim Huang 45630a2d30 Bug 1695050 - Part 4: Update the call-sites of CookieJarSettings::Create() for ServiceWorker and Worker. r=asuth
This patch updates all call-sites of CookieJarSettings::Create() to pass
the principal for ServiceWorker and Worker.

Differential Revision: https://phabricator.services.mozilla.com/D109047
2021-03-29 11:01:52 +00:00
Luca Greco 3ba66d4d86 Bug 1678927 - Expect non http channel in ServiceWorkerScriptCache CompareNetwork::OnStreamComplete. r=asuth,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D100343
2021-01-19 15:27:46 +00:00
Simon Giesecke 1c53236b70 Bug 1679272 - Include ScopeExit.h exactly where used. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D98888
2020-12-07 14:25:59 +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
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
Sonia Singla 7e4a582215 Bug 1528649 - Remove the context parameter from nsInputStreamPump::AsyncRead. r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D85154
2020-08-05 11:21:51 +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
Luca Greco 82aa5fed3a Bug 1609920 - part 1: Allow the WebExtension Framework to register a moz-extension service worker. r=dom-workers-and-storage-reviewers,asuth,mixedpuppy
- Adds the new about:config pref "extensions.backgroundServiceWorker.enabled" (currently defaults to false).
- Adds the background.service_worker property to the manifest JSON schema definition
- Locks background.service_worker manifest property behind the new preference
- Adds a new BackgroundWorker class to ext-backgroundPage.js (responsible for managing the background
  service worker for the extension, e.g. make sure that the expected worker script is registered
  as expected when the extension is starting up)
- Adds to the ServiceWorkerManager a new method to allow the WebExtension Framework to register the
  background service worker without an existing extension page
- Allows the "moz-extension" schema in the dom/serviceworkers and dom/cache internals

Depends on D63697

Differential Revision: https://phabricator.services.mozilla.com/D60244
2020-07-03 10:14:24 +00:00
Sebastian Hengst 255c22186f Backed out 4 changesets (bug 1609920) for leaks in browser-chrome. CLOSED TREE
Backed out changeset 1c8faab05606 (bug 1609920)
Backed out changeset eaa0bb2cf36b (bug 1609920)
Backed out changeset fd1e4db7cf78 (bug 1609920)
Backed out changeset 0e68db4ad6af (bug 1609920)
2020-07-01 17:10:13 +02: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
Luca Greco 665d0662d8 Bug 1609920 - part 1: Allow the WebExtension Framework to register a moz-extension service worker. r=dom-workers-and-storage-reviewers,asuth,mixedpuppy
- Adds the new about:config pref "extensions.backgroundServiceWorker.enabled" (currently defaults to false).
- Adds the background.service_worker property to the manifest JSON schema definition
- Locks background.service_worker manifest property behind the new preference
- Adds a new BackgroundWorker class to ext-backgroundPage.js (responsible for managing the background
  service worker for the extension, e.g. make sure that the expected worker script is registered
  as expected when the extension is starting up)
- Adds to the ServiceWorkerManager a new method to allow the WebExtension Framework to register the
  background service worker without an existing extension page
- Allows the "moz-extension" schema in the dom/serviceworkers and dom/cache internals

Depends on D63697

Differential Revision: https://phabricator.services.mozilla.com/D60244
2020-06-10 12:13:29 +00:00
Andrea Marchesini 2f638f8699 Bug 1644458 - Propagate CookieJarSettings with the partition key to SharedWorkers and ServiceWorkers, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D78653
2020-06-10 10:05:24 +00:00
Andreas Farre f2fa2e633c Bug 1620594 - Part 5: Use GetMainThreadSerialEventTarget instead of SystemGroup::EventTargetFor. r=nika
This patch also tries to remove the event target entirely if it would
default to the main thread on a null event target.

Depends on D67634

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

--HG--
extra : moz-landing-system : lando
2020-04-07 15:17: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
Jeff Walden 62a130ba0a Bug 1602882 - Move array operations to a new js/Array.h header. r=sfink,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D56595

--HG--
extra : moz-landing-system : lando
2019-12-11 06:17:44 +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
Andrew McCreight e1cddbb815 Bug 1599180 - Fix some trivial "browing" typos. r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D54570

--HG--
extra : moz-landing-system : lando
2019-11-25 18:32:35 +00:00
Boris Zbarsky 033a03eb89 Bug 1591491. Add more use of FakeString::ShareOrDependUpon. r=froydnj
If someone then saves the resulting string, this will let us avoid a copy.

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

--HG--
extra : moz-landing-system : lando
2019-10-28 20:41:59 +00:00
Boris Zbarsky 5062731c15 Bug 1565688. Remove unused IOService arg from NS_NewURI. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D37968

--HG--
extra : moz-landing-system : lando
2019-07-15 13:39:51 +00:00
Ehsan Akhgari 2b9f54347c Bug 1498102 - Ensure that rejection of the promise created in serviceWorkerScriptCache::PurgeCache isn't visible on the console; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D25824

--HG--
extra : moz-landing-system : lando
2019-04-02 19:56:27 +00:00
Sylvestre Ledru 4aa92e3091 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D22514
2019-03-13 10:19:06 +01:00
Andrea Marchesini 8e20bbbc9a Bug 1525245 - Stabilize cookiePolicy/cookiePermission for live documents - part 12 - nsICookieSettings for the channel creation, r=ckerschb,asuth,Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D21538

--HG--
extra : moz-landing-system : lando
2019-03-08 09:04:11 +00:00
Ciure Andrei 712dd2bb8c Backed out 16 changesets (bug 1525245) for perma failing test_document_cookie.html CLOSED TREE
Backed out changeset 3fd27215698f (bug 1525245)
Backed out changeset d9a9e8e77873 (bug 1525245)
Backed out changeset 0e6f7be92e3f (bug 1525245)
Backed out changeset 6790802e2fa5 (bug 1525245)
Backed out changeset a5a9e01116ed (bug 1525245)
Backed out changeset 66e19a0c38dd (bug 1525245)
Backed out changeset fb90d51ba853 (bug 1525245)
Backed out changeset 4772db3625b3 (bug 1525245)
Backed out changeset 9affaf0cb998 (bug 1525245)
Backed out changeset a91b7ebe8bdd (bug 1525245)
Backed out changeset c2a13a7480e1 (bug 1525245)
Backed out changeset abe4482fa137 (bug 1525245)
Backed out changeset b3920c0bcf84 (bug 1525245)
Backed out changeset 0821b81f2724 (bug 1525245)
Backed out changeset 70bed2ad7899 (bug 1525245)
Backed out changeset 5f72ba232cc8 (bug 1525245)
2019-03-07 17:54:18 +02:00
Andrea Marchesini 6856f88972 Bug 1525245 - Stabilize cookiePolicy/cookiePermission for live documents - part 12 - nsICookieSettings for the channel creation, r=ckerschb,asuth,Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D21538

--HG--
extra : moz-landing-system : lando
2019-03-07 10:21:15 +00:00
Dorel Luca ac34e1d973 Backed out 16 changesets (bug 1525245) for Android failures. CLOSED TREE
Backed out changeset 9f8a1b410320 (bug 1525245)
Backed out changeset 0ef284a9a1d5 (bug 1525245)
Backed out changeset 835e5f642a03 (bug 1525245)
Backed out changeset 362f5a8d033c (bug 1525245)
Backed out changeset 9da3ab33cf67 (bug 1525245)
Backed out changeset 6aacd2d6e835 (bug 1525245)
Backed out changeset 8ff9e8f45e02 (bug 1525245)
Backed out changeset 2020227181cc (bug 1525245)
Backed out changeset fc3c64c330b9 (bug 1525245)
Backed out changeset 2762bf88e050 (bug 1525245)
Backed out changeset ffc10fdc50a6 (bug 1525245)
Backed out changeset bb6ade1207d7 (bug 1525245)
Backed out changeset 1875eb5085e4 (bug 1525245)
Backed out changeset 7e4f67a6d6f1 (bug 1525245)
Backed out changeset e671fc9581eb (bug 1525245)
Backed out changeset b89f5def8d0d (bug 1525245)
2019-03-06 21:07:49 +02:00
Andrea Marchesini 4fabb4a2a8 Bug 1525245 - Stabilize cookiePolicy/cookiePermission for live documents - part 12 - nsICookieSettings for the channel creation, r=ckerschb,asuth,Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D21538

--HG--
extra : moz-landing-system : lando
2019-03-06 17:04:06 +00:00
Jonathan Kingston c4853316e7 Bug 1525319 - Removing context from OnStopRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20770

--HG--
extra : moz-landing-system : lando
2019-02-27 23:41:31 +00:00
Jonathan Kingston f7e35ae39e Bug 1525319 - Removing context from OnStartRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20769

--HG--
extra : moz-landing-system : lando
2019-02-27 23:41:04 +00:00
Dorel Luca 4a4dcd57fa Backed out 4 changesets (bug 1525319) for Android failures in dom/base/test/test_progress_events_for_gzip_data.html
Backed out changeset b73f033efb41 (bug 1525319)
Backed out changeset 1d318d5c6b98 (bug 1525319)
Backed out changeset 6d73418988d4 (bug 1525319)
Backed out changeset 84ca79bd2dc3 (bug 1525319)
2019-02-25 04:06:11 +02:00
Jonathan Kingston 332531fa9c Bug 1525319 - Removing context from OnStopRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20770

--HG--
extra : moz-landing-system : lando
2019-02-24 20:26:59 +00:00