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

937 Коммитов

Автор SHA1 Сообщение Дата
Mark Banner a26105ff45 Bug 1501662 - Add more .eslintrc.js files for test directories (dom, modules, netwerk and parser). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D9661

--HG--
extra : moz-landing-system : lando
2018-10-24 19:11:17 +00:00
James Lee 322311866d Bug 1423839 - Part 2: Enable ESLint for NetUtil.jsm and netwerk/cookie/test/unit/ (manual changes) r=Standard8,jdm
Depends on D9293.

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

--HG--
extra : moz-landing-system : lando
2018-10-22 23:42:48 +00:00
James Lee 9204c97c31 Bug 1423839 - Part 1: Enable ESLint for NetUtil.jsm and netwerk/cookie/test/unit/ (automatic changes) r=Standard8,jdm
Ran ESLint's automatic '--fix' option on the above files.

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

--HG--
extra : moz-landing-system : lando
2018-10-23 08:34:13 +00:00
Dorel Luca c366888702 Backed out 2 changesets (bug 1423839) for xpcshell failures on netwerk/test/unit/test_NetUtil.js
Backed out changeset 501fffbf872d (bug 1423839)
Backed out changeset 406ca9722ffa (bug 1423839)
2018-10-23 00:49:18 +03:00
James Lee 3faf6a185f Bug 1423839 - Part 2: Enable ESLint for NetUtil.jsm and netwerk/cookie/test/unit/ (manual changes) r=Standard8,jdm
Depends on D9293.

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

--HG--
extra : moz-landing-system : lando
2018-10-22 19:41:58 +00:00
James Lee d001a272ab Bug 1423839 - Part 1: Enable ESLint for NetUtil.jsm and netwerk/cookie/test/unit/ (automatic changes) r=Standard8,jdm
Ran ESLint's automatic '--fix' option on the above files.

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

--HG--
extra : moz-landing-system : lando
2018-10-22 19:41:33 +00:00
Nicholas Nethercote 8478f8d66e Bug 1489047 - Change almost all DOMString occurrences in XPIDL files to AString. r=nika
Because they have almost identical semantics.

--HG--
extra : rebase_source : ea9074bcac2a1d190b88a5d1afc15997593659b7
2018-09-06 18:02:43 +10:00
Nicholas Hurley c5f9b83562 Bug 1440462 - Send httponly cookie names to content processes. r=jdm
Previously, if script tried to set a cookie that matched a cookie we had
received via Set-Cookie that was labeled httponly, script would think
that cookie was properly set (even though it wasn't). This ensures that
script knows just enough about httponly cookies to prevent this
inconsistent view while avoiding leakages of the potentially-sensitive
cookie values.

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

--HG--
extra : moz-landing-system : lando
2018-09-26 15:39:33 +00:00
Andrea Marchesini c00db8b8f6 Bug 1493587 - Remove deprecated attributes in nsICookie, r=ehsan 2018-09-25 07:01:25 +02:00
Andrea Marchesini 47e5a8b711 Bug 1260399 - Remove deprecated messages in nsICookieManager methods - part 4 - remove the deprecated message, r=ehsan 2018-09-24 11:37:57 +02:00
Andrea Marchesini b958c6f170 Bug 1260399 - Remove deprecated messages in nsICookieManager methods - part 3 - nsICookieManager.cookieExists, r=ehsan 2018-09-24 11:37:57 +02:00
Andrea Marchesini 42c515aa1c Bug 1260399 - Remove deprecated messages in nsICookieManager methods - part 2 - nsICookieManager.getCookiesFromHost(), r=ehsan 2018-09-24 11:37:57 +02:00
Andrea Marchesini 61a7f9a598 Bug 1260399 - Remove deprecated messages in nsICookieManager methods - part 1 - nsICookieManager.add(), r=ehsan 2018-09-24 11:37:56 +02:00
Andrea Marchesini def259a086 Bug 1260399 - Remove deprecated messages in nsICookieManager methods - part 0 - nsICookieManager.remove() should not have optional parameters, r=ehsan 2018-09-24 11:37:56 +02:00
Diego Pino Garcia 0f11b0a3d3 Bug 1483986 - Remove sync versions of document.cookie getter/setter; r=ehsan,froydnj 2018-09-21 23:01:32 -04:00
Andrea Marchesini 125aa75f3b Bug 1492769 - Fix a cookie policy range check in CookieServiceChild, r=ehsan 2018-09-21 07:31:41 +02:00
Nathan Froyd e7b3b3140d Bug 1415980 - make hash keys movable and not copyable; r=erahm
Everything that goes in a PLDHashtable (and its derivatives, like
nsTHashtable) needs to inherit from PLDHashEntryHdr. But through a lack
of enforcement, copy constructors for these derived classes didn't
explicitly invoke the copy constructor for PLDHashEntryHdr (and the
compiler didn't invoke the copy constructor for us). Instead,
PLDHashTable explicitly copied around the bits that the copy constructor
would have.

The current setup has two problems:

1) Derived classes should be using move construction, not copy
   construction, since anything that's shuffling hash table keys/entries
   around will be using move construction.

2) Derived classes should take responsibility for transferring bits of
   superclass state around, and not rely on something else to handle that.

The second point is not a huge problem for PLDHashTable (PLDHashTable
only has to copy PLDHashEntryHdr's bits in a single place), but future
hash table implementations that might move entries around more
aggressively would have to insert compensation code all over the
place. Additionally, if moving entries is implemented via memcpy (which
is quite common), PLDHashTable copying around bits *again* is
inefficient.

Let's fix all these problems in one go, by:

1) Explicitly declaring the set of constructors that PLDHashEntryHdr
   implements (and does not implement). In particular, the copy
   constructor is deleted, so any derived classes that attempt to make
   themselves copyable will be detected at compile time: the compiler
   will complain that the superclass type is not copyable.

This change on its own will result in many compiler errors, so...

2) Change any derived classes to implement move constructors instead of
   copy constructors. Note that some of these move constructors are,
   strictly speaking, unnecessary, since the relevant classes are moved
   via memcpy in nsTHashtable and its derivatives.
2018-09-20 11:20:36 -04:00
Eric Rahm 2fb6934934 Bug 1492204 - Part 3: Remove references to char_iterator. r=froydnj
We can just use 'iterator' now that nsWritingIterator is gone.

--HG--
extra : rebase_source : 3f6fbafc9b57ce89afba581b224b3dc2295fa614
2018-09-18 12:05:23 -07:00
Kershaw Chang cca49915e3 Bug 1487085 - Allow to set cookie with a null channel in child process, r=valentin
In the current implmentation of CookieServiceChild::SetCookieString, pass a null channel will crash the child process. This is because we call aChannel->GetURI() without checking if aChannel is null.
However, set cookie with a null channel is possible in non-e10s mode. To make sure the behavior to be consistent in both non-e10s and e10s mode, we have to pass an empty URIParams in child process.

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

--HG--
extra : moz-landing-system : lando
2018-09-12 15:14:32 +00:00
Gerald Squelart b51e0fd0cc Bug 1489944 - Fixed some std::move warnings - r=froydnj
> dom/media/gmp/CDMStorageIdProvider.cpp(63,10):  warning:
> local variable 'storageId' will be copied despite being returned by name [-Wreturn-std-move]
nsAutoCString -> nsCString, will add std::move().

> layout/painting/DisplayItemClip.cpp(581,10):  warning:
> local variable 'str' will be copied despite being returned by name [-Wreturn-std-move]
nsAutoCString -> nsCString, will add std::move().

> layout/painting/DisplayItemClipChain.cpp(88,10):  warning:
> local variable 'str' will be copied despite being returned by name [-Wreturn-std-move]
nsAutoCString -> nsCString, will add std::move().

> layout/painting/nsDisplayList.cpp(179,10):  warning:
> local variable 'str' will be copied despite being returned by name [-Wreturn-std-move]
nsAutoCString -> nsCString, will add std::move().

> gfx/thebes/gfxWindowsPlatform.cpp(454,10):  warning:
> moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
Will remove std::move().

> gfx/thebes/gfxFontEntry.cpp(245,20):  warning:
> local variable 'name' will be copied despite being returned by name [-Wreturn-std-move]
nsAutoCString -> nsCString, will add std::move().

> netwerk/cookie/nsCookieService.cpp(4460,10):  warning:
> local variable 'path' will be copied despite being returned by name [-Wreturn-std-move]
GetPathFromURI() result is stored in an nsAutoCString, so it might as well return that type.

> toolkit/components/extensions/WebExtensionPolicy.cpp(462,12):  warning:
> local variable 'result' will be copied despite being returned by name [-Wreturn-std-move]
> toolkit/components/extensions/WebExtensionPolicy.cpp(475,10):  warning:
> local variable 'result' will be copied despite being returned by name [-Wreturn-std-move]
`result` may be empty or may be arbitrarily long, so I'll use nsCString inside the function.

> toolkit/xre/CmdLineAndEnvUtils.h(349,10):  warning:
> moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
Returning an UniquePtr, will remove std::move().
Also will `return s` instead of `return nullptr` when `(!s)`, to avoid extra construction which could also prevent elision (not entirely sure, but it's at least not worse!); and it's clearer that the two `return`s return the same already-constructed on-stack object.

> tools/profiler/core/shared-libraries-win32.cc(111,10):  warning:
> local variable 'version' will be copied despite being returned by name [-Wreturn-std-move]
nsPrintfCString -> nsCString, will add std::move().

> xpcom/glue/FileUtils.cpp(179,10):  warning:
> local variable 'fullName' will be copied despite being returned by name [-Wreturn-std-move]
> xpcom/glue/FileUtils.cpp(209,10):  warning:
> local variable 'path' will be copied despite being returned by name [-Wreturn-std-move]
nsAuto{,C}String -> ns{,C}String, will add std::move().

This allowed removals of 'AllowCompilerWarnings' from layout/painting,
netwerk/cookie, and toolkit/components/extensions.

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

--HG--
extra : moz-landing-system : lando
2018-09-10 15:51:48 +00:00
Tiberius Oros a325c6ef11 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-09-06 01:27:49 +03:00
Ehsan Akhgari bff765cf05 Bug 1488784 - Part 2: Remove the XPCOM component registration for nsCookiePermission; r=jdm
Differential Revision: https://phabricator.services.mozilla.com/D5038
2018-09-05 11:56:17 -04:00
Kershaw Chang b3b648ffd1 Bug 1488441 - Extend cookie's expiring time from 1s to 3s r=jdm
The fail log shows that the cookie's expiring time is too short(only 1s). The cookie could be already expired.
A simple solution in this patch is just extending the expiring time to 3s.

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

--HG--
extra : moz-landing-system : lando
2018-09-05 18:24:51 +00:00
Daniel Varga 3c3e9e37c6 Merge mozilla-central to mozilla-inbound
--HG--
extra : rebase_source : 65372156c004c649109b08227f8aa6a91cb22969
2018-09-04 01:05:40 +03:00
Kershaw Chang 766fce11a1 Bug 1357676 - Implement batch eviction r=jdm
1. Add network.cookie.QuotaPerHost, which has the default value 150.
2. When the cookies exceed more than 180, evict cookies to 150.
3. The concept of eviction is to sort all cookies by whether the cookie is expired and the cookie's last access time. Then, evict cookies by the given count.
4. Details of evict algorithm:
   4.1 Create a priority queue and push all cookies in it.
   4.2 Use custom comparator to compare the cookie by expiry and last access.
   4.3 Pop 30(180 - 150) cookies from the queue and append them to an output array.

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

--HG--
extra : moz-landing-system : lando
2018-09-03 14:49:58 +00:00
Andrea Marchesini 40a8c122d3 Bug 1487331 - STATE_BLOCKED_TRACKING_COOKIES must tell why cookies are blocked, r=ehsan
Introduce these new blocking state values:

const unsigned long STATE_COOKIES_BLOCKED_BY_PERMISSION = 0x10000000;
const unsigned long STATE_COOKIES_BLOCKED_TRACKER       = 0x20000000;
const unsigned long STATE_COOKIES_BLOCKED_ALL           = 0x40000000;
const unsigned long STATE_COOKIES_BLOCKED_FOREIGN       = 0x80000000;
2018-08-31 11:02:33 +02:00
Ehsan Akhgari 743149d399 Bug 1488115 - Part 2: Replace the usage of nsUTF8ConverterService in nsCookie.cpp with the mozilla/Encoding.h API; r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D4873
2018-09-03 14:58:50 -04:00
Andrea Marchesini 1d190ffa57 Bug 1487093 - Call AntiTrackingCommon::NotifyRejection when cookies are rejected because of cookie policies, r=ehsan 2018-08-30 17:44:38 +02:00
Ehsan Akhgari d4ab894392 Bug 1486926 - Part 1: Make the Disable Protection button in the control centre UI work for the reject foreign cookie behavior; r=baku 2018-08-29 14:26:22 -04:00
Tiberius Oros 0354172fa8 Backed out 5 changesets (bug 1486944, bug 1486926)for multiple failures on a CLOSED TREE
Backed out changeset b536e2deff08 (bug 1486944)
Backed out changeset 5fc45a7e2b35 (bug 1486944)
Backed out changeset fef913dda33d (bug 1486926)
Backed out changeset f6533c40954f (bug 1486926)
Backed out changeset 20f625526901 (bug 1486926)
2018-08-29 16:50:15 +03:00
Ehsan Akhgari 1743f7b993 Bug 1486926 - Part 1: Make the Disable Protection button in the control centre UI work for the reject foreign cookie behavior; r=baku 2018-08-29 08:27:15 -04:00
Ehsan Akhgari 0a3c630be4 Bug 1486184 - Add reject tracker to the list of cases that we consider requiring third-party checks for; r=baku
This was an omission from bug 1480780 which merged the prefs.
2018-08-27 09:17:25 -04:00
Kris Maglione 3a5c05e76f Bug 1484496: Part 5e - Convert remaining nsISimpleEnumerator users to use JS iteration. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D3733

--HG--
extra : rebase_source : c0fac176d7b3d840c4dbb14f8d95ccfc7f83a5a8
extra : histedit_source : a92c40117d0808a3ad68c972f622a7a42c9ae8ba
2018-08-18 18:13:14 -07:00
Kris Maglione 2dee0aae3c Bug 1484496: Part 4b - Add intrinsic type information to most nsSimpleEnumerators. r=froydnj
This allows JS callers to automatically get the correct types during
interation, without having to explicitly specify them.

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

--HG--
extra : rebase_source : b708f382d8ea571d199c669bfed5b5a7ca9ffac4
extra : histedit_source : 7df6feb82088c8a5ca45dc28fe4d2b852c177fee
2018-08-18 21:06:32 -07:00
Andrea Marchesini d1e5833a37 Bug 1480780 - Merge the privacy.3rdpartystorage.enabled pref with the network.cookie.cookieBehavior pref; r=ehsan
This patch introduces a new cookie behavior policy called
BEHAVIOR_REJECT_TRACKER.  It also makes it possible to override that
behavior with cookie permissions similar to other cookie behaviors.
2018-08-13 16:01:16 -04:00
Junior Hsu 6fcddbf2de Bug 1481609 - Remove MOZ_SQLITE_COOKIES_OLD_SCHEMA telemetry probe r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D2896

--HG--
extra : moz-landing-system : lando
2018-08-08 16:43:09 +00:00
Masatoshi Kimura 3b21b7868b Bug 1090497 - Re-enable warnings as errors on clang-cl. r=froydnj
--HG--
extra : rebase_source : c09366fb93e5b0f72abe1e99d3094e3d96a934fb
extra : intermediate-source : 5950c9d63c3b4fd63a25464a7b50944aaec7079f
extra : source : ca1b9a2bcc4381795f556fea2fb59066567c30f3
2018-07-31 22:10:07 +09:00
Andrea Marchesini 5991b3ebdd Bug 1457170 - Get rid of nsICookieService::ACCEPT_FOR_N_DAYS, r=valentin 2018-08-01 14:41:21 +02:00
Cosmin Sabou bfc1e72e01 Backed out changeset 9035ff3757ac (bug 1415980) at request from froydnj on the suspicion that it's going to break MSVC builds when it gets merged to central. 2018-07-31 01:19:49 +03:00
Nathan Froyd 017b016850 Bug 1415980 - make hash keys movable and not copyable; r=erahm
Everything that goes in a PLDHashtable (and its derivatives, like
nsTHashtable) needs to inherit from PLDHashEntryHdr.  But through a lack
of enforcement, copy constructors for these derived classes didn't
explicitly invoke the copy constructor for PLDHashEntryHdr (and the
compiler didn't invoke the copy constructor for us).  Instead,
PLDHashTable explicitly copied around the bits that the copy constructor
would have.

The current setup has two problems:

1) Derived classes should be using move construction, not copy
   construction, since anything that's shuffling hash table keys/entries
   around will be using move construction.

2) Derived classes should take responsibility for transferring bits of
   superclass state around, and not rely on something else to handle
   that.

The second point is not a huge problem for PLDHashTable (PLDHashTable
only has to copy PLDHashEntryHdr's bits in a single place), but future
hash table implementations that might move entries around more
aggressively would have to insert compensation code all over the place.
Additionally, if moving entries is implemented via memcpy (which is
quite common), PLDHashTable copying around bits *again* is inefficient.

Let's fix all these problems in one go, by:

1) Explicitly declaring the set of constructors that PLDHashEntryHdr
   implements (and does not implement).  In particular, the copy
   constructor is deleted, so any derived classes that attempt to make
   themselves copyable will be detected at compile time: the compiler
   will complain that the superclass type is not copyable.

   This change on its own will result in many compiler errors, so...

2) Change any derived classes to implement move constructors instead
   of copy constructors.  Note that some of these move constructors are,
   strictly speaking, unnecessary, since the relevant classes are moved
   via memcpy in nsTHashtable and its derivatives.
2018-07-30 17:15:11 -04:00
Andrea Marchesini 1498612e1b Bug 1474812 - No needs to store granted storage access in nsILoadInfo and in the inner window, r=ehsan 2018-07-13 12:02:19 +02:00
Andrea Marchesini 0a542c2c05 Bug 1469993 - Grant storage access to a 3rd party, tracking resource if a opened document has user-interaction - part 7 - cookies, r=ehsan 2018-07-10 10:09:59 +02:00
Margareta Eliza Balazs c37b51f523 Backed out 9 changesets (bug 1469993) for causing bustage in build/srcdom/base/nsGlobalWindowInner.cpp on a CLOSED TREE
Backed out changeset e89192032fe2 (bug 1469993)
Backed out changeset 4b261595099d (bug 1469993)
Backed out changeset 37182cfe869c (bug 1469993)
Backed out changeset 5b9870995c73 (bug 1469993)
Backed out changeset 55499fcd9738 (bug 1469993)
Backed out changeset 8c1c838d54ba (bug 1469993)
Backed out changeset 12b9c8bfa41f (bug 1469993)
Backed out changeset 04ab7d6c169a (bug 1469993)
Backed out changeset 53885d61244e (bug 1469993)
2018-07-10 11:32:34 +03:00
Andrea Marchesini de64db476d Bug 1469993 - Grant storage access to a 3rd party, tracking resource if a opened document has user-interaction - part 7 - cookies, r=ehsan 2018-07-10 10:09:59 +02:00
Rob Wu d987da8b60 Bug 1351663 - Ensure that OriginAttributes is initialized when nsCookieService::Add receives a SameSite parameter r=valentin
InitializeOriginAttributes takes aArgc and only initializes the
parameter when aArgc is 1. nsCookieService::Add takes another optional
parameter, namely aSameSite. If a caller sets this SameSite flag, then
InitializeOriginAttributes would skip the initialization of the
OriginAttributes.

This was caught by a private browsing test in
toolkit/components/extensions/test/mochitest/test_ext_cookies.html
(after I added support for SameSite flag in the extension API)

MozReview-Commit-ID: HLfte7x1X7T

--HG--
extra : rebase_source : 1feb84ceca157d8c5ec8575c6336cc606c3504fe
2018-06-09 01:21:02 +02:00
Rob Wu a1cd43731e Bug 1351663 - Skip "optimization" if SameSite flag changes r=valentin
After writing a unit test I discovered that updating a cookie's samesite
flag did not work. This is caused by an "optimization" that avoids
modifying a cookie if any of the cookie attributes were not changed.
This check did not account for the SameSite flag, until now.

A unit test for this will be added in a later commit, at
toolkit/components/extensions/test/xpcshell/test_ext_cookies_samesite.js

MozReview-Commit-ID: ChiwwqqOE57

--HG--
extra : rebase_source : f6bd9bd650f6db50a0726451cd781ca7984962a1
2018-06-09 00:23:45 +02:00
Chris Peterson 2afd829d0f Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj
This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.

MozReview-Commit-ID: 5UQVHElSpCr

--HG--
extra : rebase_source : 4c1b2fc32b269342f07639266b64941e2270e9c4
extra : source : 907543f6eae716f23a6de52b1ffb1c82908d158a
2018-06-17 22:43:11 -07:00
Andrea Marchesini 99fa4c908a Bug 1470578 - Rename the anti-tracking pref, r=francois 2018-06-25 22:46:13 +02:00
Andrea Marchesini 5b9437cad2 Bug 1461921 - Block storage access for third-parties on the tracking protection list - part 5 - Cookies, r=ehsan 2018-06-20 13:38:22 -04:00
Andi-Bogdan Postelnicu dcb297f5a0 Bug 1453795 - Netwerk/Coockies - Initialize member fields in classes/ structures. r=josh 2018-06-13 23:52:59 +03:00
Andrea Marchesini 1273dc5391 Bug 1446933 - Remove 'using namespace mozilla::net' from BackgroundUtils.h, r=qdot 2018-05-30 21:21:17 +02:00
Nicholas Hurley e648506f89 Bug 1460251 - Up cookie limit to 180 per host and expose prefs. r=mcmanus
MozReview-Commit-ID: 1zFMQ4pbntp

--HG--
extra : rebase_source : 3a0537b63bedaa50f8c59985f24ff9f718cd2814
2018-05-08 04:45:20 -07:00
Mark Banner 9c03ace970 Bug 1458235 - Fix various cases where Assert.ok or Assert.equal have been called wrongly. r=Gijs
MozReview-Commit-ID: Br3lKpKNVQJ

--HG--
extra : rebase_source : 972c69ecf63bb522b0f368e3c388f4eff558bbe3
2018-05-01 22:15:43 +01:00
Andi-Bogdan Postelnicu 3f2298c2f6 Bug 1457411 - Update netwerk module to make use of newer methods introduced with c++11 and c++14. r=valentin
MozReview-Commit-ID: 666LNaHyiuQ

--HG--
extra : rebase_source : f3a24e0342d8dcdf9020dd473bc6b1045cbc533b
2018-04-30 19:46:04 +03:00
Valentin Gosu f127ad2cdb Bug 1454100 - Add some telemetry for time spent moving cookies r=Ehsan,francois,mayhemer
MozReview-Commit-ID: 1pAiKaSok3J

--HG--
extra : rebase_source : ac0685003b643dc2ed9b55bfad676dfdddd06e81
2018-04-26 16:56:40 +02:00
Valentin Gosu d47341a80e Bug 1454100 - Move cookies around every X seconds r=Ehsan,mayhemer
MozReview-Commit-ID: Y1zUvbDgDX

--HG--
extra : rebase_source : e43b03369250dab027287316f778e75ef81e6879
2018-04-26 16:39:13 +02:00
Cosmin Sabou 4595d43d3a Merge inbound to mozilla-central. a=merge
--HG--
rename : browser/modules/offlineAppCache.jsm => toolkit/modules/offlineAppCache.jsm
2018-04-20 01:29:10 +03:00
Christoph Kerschbaumer cf3858588b Bug 1454914: Exempt web-extensions from same-site cookie policy. r=valentin,kmag 2018-04-19 20:00:37 +02:00
Valentin Gosu 2d5b10a0b5 Bug 1450199 - Cookie is not synced across tabs r=Ehsan
This patch reverts parts of changeset e87e706def11 (bug 1425031).
The problem in bug 1425031 was that when the content process set a cookie
a notification was sent to the parent process. This notification was then
forwarded to all the content processes, including the one it originated from.
The solution was to not forward cookies that originated from a content
process, but this causes the current bug.
The correct fix is to forward the cookie changes to all content processes
except the one they originated from.
The test for bug 1425031 remains, and should keep passing.


MozReview-Commit-ID: 1P6JwHQDy93

--HG--
extra : rebase_source : 85845c93059004836e14d5a46f2df881237fad6e
2018-04-19 13:18:50 +02:00
shindli 805cb19c1d Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-04-17 01:45:58 +03:00
Christoph Kerschbaumer 5f9d175cdf Bug 1454242: Setting samesite cookie should not rely on NS_IsSameSiteForeign. r=valentin 2018-04-16 07:18:21 +02:00
Sebastian Hengst 0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Christoph Kerschbaumer dadd18d654 Bug 1452496: Discard same-site cookie in cross site context. r=valentin 2018-04-12 12:52:51 +02:00
Tristan Bourvon a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Gurzau Raul 719a001ee1 Backed out 2 changesets (bug 1452496) for bustage on build/src/netwerk/test/TestNamedPipeService.cpp on a CLOSED TREE
Backed out changeset 071ecf5e3680 (bug 1452496)
Backed out changeset 8bf36c469e22 (bug 1452496)
2018-04-10 19:22:01 +03:00
Christoph Kerschbaumer aaaf3a0193 Bug 1452496: Discard same-site cookie in cross site context. r=dveditz 2018-04-10 17:17:49 +02:00
Francois Marier 8ac645b0cd Bug 1452699 - Add a temporary pref to disable same-site cookies. r=ckerschb,valentin
MozReview-Commit-ID: LRnaSmdSgVW

--HG--
extra : rebase_source : 9dd301f4d49b0fe6f81531d81bac2466032cc3a3
2018-04-13 18:52:28 -07:00
Christoph Kerschbaumer b844c33ae2 Bug 1286861: Update CookieService to enforce same site cookies. r=valentin 2018-04-08 19:52:05 +02:00
Francois Marier 6ed7327a36 Bug 1430803 - Ignore SameSite cookie attribute when value is empty or unrecognised. r=valentin
Make the parsing the the attribute spec-compliant:
https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-02#section-5.3.7

MozReview-Commit-ID: 8YpkZvgryJb

--HG--
extra : rebase_source : 52140ffdcd50cb7a90c3824711d3d63c051eac54
2018-04-05 17:09:13 -07:00
Henri Sivonen a6b323b14d Bug 1448297 - Assume contiguous XPCOM strings in nsCookie.cpp. r=Ehsan
MozReview-Commit-ID: 8aOh13vz6lM

--HG--
extra : rebase_source : bfb7160ff30ed3b29cae3d61bd7ed656aa4dc92f
2018-03-23 14:16:23 +02:00
Kirk Steuber 42a3fa21d7 Bug 1429169 - Facilitate testing of cookie-related enterprise policy by always firing the cookie-db-read event r=jimm
There seems to be no reason to conditionally fire the cookie-db-read event. Currently it is not fired if no cookies were read. There seems to be only one other consumer of this event (a test) which should work fine if the event were fired every time. This change would eliminate a particularly ugly workaround in cookie-related policy testing.

MozReview-Commit-ID: FbD1cvsBZBO

--HG--
extra : rebase_source : 6611debb3567310c61e5a5dc9cedadeae888cfe5
2018-03-20 14:56:02 -07:00
Andreea Pavel f08ea922ba Backed out 4 changesets (bug 1429169) for failing browser chrome at browser/components/enterprisepolicies/tests/browser/browser_policy_cookie_settings.js on a CLOSED TREE
Backed out changeset a49df97d2ad9 (bug 1429169)
Backed out changeset 437f677d3808 (bug 1429169)
Backed out changeset 2f744fd3d77c (bug 1429169)
Backed out changeset dd305f45f746 (bug 1429169)
2018-03-30 03:35:01 +03:00
Kirk Steuber 544cf05b75 Bug 1429169 - Facilitate testing of cookie-related enterprise policy by always firing the cookie-db-read event r=jimm
There seems to be no reason to conditionally fire the cookie-db-read event. Currently it is not fired if no cookies were read. There seems to be only one other consumer of this event (a test) which should work fine if the event were fired every time. This change would eliminate a particularly ugly workaround in cookie-related policy testing.

MozReview-Commit-ID: FbD1cvsBZBO

--HG--
extra : rebase_source : ff5049f36c7f3df3ad182ebb1a6ccc5db1032e23
2018-03-20 14:56:02 -07:00
Tom Ritter 9c3d32ebab Bug 1444490 Declare classses (and one method) in network/ final to reduce virtual function calls r=nwgh
MozReview-Commit-ID: 4oaazbPhpbc

--HG--
extra : rebase_source : 7c01066363605c64fc76332686b2c4d9c2af6518
2018-03-09 08:37:18 -06:00
Andrew McCreight 5dec0e0beb Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG

--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
2018-02-06 09:36:57 -08:00
Kris Maglione 918ed6c474 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
extra : intermediate-source : 34c999fa006bffe8705cf50c54708aa21a962e62
extra : histedit_source : b2be2c5e5d226e6c347312456a6ae339c1e634b0
2018-01-29 15:20:18 -08:00
Amy Chung a0e6c2af00 Bug 1425031 - Don't broadcast to content processes cookie updates that initiated in content processes. r=jdm 2018-01-12 12:53:00 -05:00
Cosmin Sabou 9a65a40178 Backed out 3 changesets (bug 1431533) for Android mochitest failures on testEventDispatcher on a CLOSED TREE
Backed out changeset a1eca62826a1 (bug 1431533)
Backed out changeset 34c999fa006b (bug 1431533)
Backed out changeset e2674287e57f (bug 1431533)
2018-01-30 07:17:48 +02:00
Kris Maglione 6476f95b13 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
2018-01-29 15:20:18 -08:00
Brindusan Cristian af8879d1eb Backed out 2 changesets (bug 1431533) for ESlint failures on a CLOSED TREE
Backed out changeset 6e56f4c8843e (bug 1431533)
Backed out changeset 12fc4dee861c (bug 1431533)
2018-01-30 02:32:43 +02:00
Kris Maglione c276bb9375 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : rebase_source : c004a023389f1f6bf3d2f3efe93c13d423b23ccd
2018-01-29 15:20:18 -08:00
Brindusan Cristian dbf026ac00 Backed out changeset 1a64ce266ba5 (bug 1425031) for mochitest failures on test_1425031.html on a CLOSED TREE 2018-01-30 00:20:25 +02:00
Amy Chung 6c7cd2d790 Bug 1425031 - Don't broadcast to content processes cookie updates that initiated in content processes. r=jdm 2018-01-12 12:53:00 -05:00
Emilio Cobos Álvarez 671dccb84a Bug 1428589: Correctly handle expiring all the cookies in an entry. r=jdm
MozReview-Commit-ID: 6qaC9yclvP2
2018-01-11 06:07:38 +01:00
Florian Quèze 0f55cd45be Bug 1421992 - script-generated patch to replace do_execute_soon, do_print and do_register_cleanup with executeSoon, info and registerCleanupFunction, rs=Gijs. 2017-12-21 11:10:23 +01:00
Florian Quèze 032c961e0a Bug 1421992 - script-generated patch to replace do_check_* functions with their Assert.* equivalents, rs=Gijs. 2017-12-21 11:08:17 +01:00
Amy Chung 222e1893c3 Bug 1421324 - Modify rejection timing when processing httponly cookie on CookieServiceChild. r=jdm 2017-12-14 13:29:32 -06:00
Sylvestre Ledru 9bfe27d903 Bug 1394734 - Replace CONFIG['GNU_C*'] by CONFIG['CC_TYPE'] r=glandium
MozReview-Commit-ID: 7duJk2gSd4m

--HG--
extra : rebase_source : 7312fe276e561e8c034a5f6749774ae812727f9c
2017-12-07 22:09:15 +01:00
Dorel Luca 79499f4044 Merge mozilla-central to autoland r=merge on a CLOSED TREE 2017-11-29 12:31:25 +02:00
Mark Banner 099e4fa549 Bug 1421458 - Add more initial configuration setup and prepare .eslintignore for enabling ESLint on more xpcshell-test directories. r=mossop
MozReview-Commit-ID: 4nbTuNNnAdZ

--HG--
extra : rebase_source : 7131f0ddad79d28615a5799c657972bd84a69180
2017-11-28 22:57:08 +00:00
Tim Huang 7f5b17baa5 Bug 1410134 - Fix the remove-while-iterating for RemoveCookiesWithOriginAttributes. r=jdm
MozReview-Commit-ID: u56N4084lL
2017-11-28 14:56:55 -05:00
Junior Hsu 5485f27c35 Bug 1413839 - Add telemetry to probe how close we are going to block main thread. r=ngwh, data-r=francois 2017-11-21 10:51:11 -05:00
Junior Hsu f5ad53fef0 Bug 1416985 - Fix the telemetry for using legacy cookies.txt, r=jdm 2017-11-16 19:24:00 +02:00
Junior Hsu 2976cce51f Bug 1415120 - Part1: no db access while rebuilding, r=nwgh
--HG--
extra : rebase_source : eae928de8e7c4f827f516dc1fb737ef2b544bbc5
2017-11-15 20:03:00 +02:00
Junior Hsu e0ae5de7ef Bug 1412218 - Add telemetry probe for how many users with legacy cookie files. r=jdm, data-r=francois 2017-11-05 17:48:36 -05:00
Valentin Gosu 1bd153659e Bug 1407720 - Merge nsICookieManager and nsICookieManager2 r=nwgh
MozReview-Commit-ID: HuzeeB43YZZ

--HG--
extra : rebase_source : 3924170ce50126dbbae7c97cae601b69d0ab95af
2017-10-31 13:02:28 +01:00
Junior Hsu 96911b1321 Bug 870460 - Part 4: Make the lifecycle of cookie thread alongwith the profile. r=ngwh 2017-10-25 01:30:00 -04:00
Junior Hsu 68d3cbb372 Bug 870460 - Part 2: Close syncconn for edge cases. r=nwgh
--HG--
extra : source : b0ddf460db0712431c4bfd8d6590eb69a23ecf4e
2017-10-09 00:19:00 -04:00
Junior Hsu 51ac771e2d Bug 870460 - Part 1: Let cookie db startup-read off-main-thread. r=nwgh, r=jdm, data-r=francois
--HG--
extra : source : 6c48185764430d35558cf6a0174bc447674e8d58
2017-08-29 18:16:27 +08:00
Sebastian Hengst ec34b16044 Backed out changeset 6c4818576443 (bug 870460) for failing many xpcshell tests, e.g. extensions/cookie/test/unit/test_cookies_async_failure.js. r=backout
--HG--
extra : amend_source : e5bb4ef1b68ae382c6457f77077f33174518efd1
2017-10-24 16:48:17 +02:00
Sebastian Hengst f9cf88ef78 Backed out changeset b0ddf460db07 (bug 870460) 2017-10-24 16:48:11 +02:00
Sebastian Hengst 6cc5547626 Backed out changeset edacb0144b17 (bug 870460) 2017-10-24 16:48:00 +02:00
Junior Hsu e91546afa5 Bug 870460 - Part 4: Make the lifecycle of cookie thread alongwith the profile. r=ngwh
--HG--
extra : rebase_source : d6de8363bf577a516b90ba00268d2a28e7da12df
2017-10-17 02:10:00 -04:00
Junior Hsu 5a950b703b Bug 870460 - Part 2: Close syncconn for edge cases. r=nwgh
--HG--
extra : rebase_source : 83477d8bb1671a2217aee9c04a4d1d9a1999a0da
2017-10-09 00:19:00 -04:00
Junior Hsu 725658c3ff Bug 870460 - Part 1: Let cookie db startup-read off-main-thread. r=nwgh, r=jdm, data-r=francois
--HG--
extra : rebase_source : 9892af8b907e67c8f4e6ee6cbe124b21ee10cc58
2017-08-29 18:16:27 +08:00
Masatoshi Kimura dbd92543c6 Bug 1313150 - Remove |weak| parameter from nsIMutableArray methods. r=froydnj
MozReview-Commit-ID: 7JoD4VYzZp3

--HG--
extra : rebase_source : 5db437f1c34608aa223916874d62b48c59baeae8
2017-10-21 23:53:02 +09:00
Chris Peterson 38fcf1fd08 Bug 1160368 - Part 2: Collect telemetry on how often first- and third-party cookies are set from HTTPS origins. r=jdm data-review=francois
This new COOKIE_SCHEME_HTTPS telemetry probe reports the same information as the COOKIE_SCHEME_SECURITY probe, but also categories cookies by whether they are set from an HTTP or HTTPS origin.

MozReview-Commit-ID: IWg8dycCzwq

--HG--
extra : source : 94708be3f00796680377b3235b78f7db70c34510
extra : intermediate-source : eaf32e92b13d54a8e8d70a7b8caf420800641d49
2017-02-16 18:58:48 -08:00
Chris Peterson f38368c9cc Bug 1160368 - Part 1: Add flag to treat third-party cookies set over nonsecure HTTP as session cookies. r=jdm
"Nonsecure HTTP" here just means regular, not-HTTPS HTTP. It doesn't mean HTTPS without the `Secure` cookie flag. Honor the expiration time of third-party cookies set over HTTPS, whether or not they have the `Secure` cookie flag. If a third-party cookie is set over HTTPS and then later sent in nonsecure HTTP request (which is allowed for cookies without the `Secure` cookie flag), the cookie won't be turned into a session cookie unless the nonsecure HTTP response sets a new cookie value.

This feature is controlled by the pref "network.cookie.thirdparty.nonsecureSessionOnly".

MozReview-Commit-ID: HlCg21JyvNC

--HG--
rename : extensions/cookie/test/unit/test_cookies_thirdparty_session.js => extensions/cookie/test/unit/test_cookies_thirdparty_nonsecure_session.js
extra : source : d1be2e4265201efd3ee93e965ac68561f548fd05
extra : intermediate-source : f5b382fa1b70e30a907b1f10d74f8c0c6dff344e
2017-02-16 19:27:49 -08:00
Kris Maglione 3676137220 Bug 1404172: Remove MatchPattern.jsm. r=aswan
MozReview-Commit-ID: ItGMuChHS3z

--HG--
rename : toolkit/modules/addons/MatchPattern.jsm => toolkit/modules/addons/MatchURLFilters.jsm
extra : rebase_source : 986542ba4270799ca1d213d5b4807d12ab7ac148
2017-09-28 18:27:44 -07:00
Amy Chung 3eec3617b1 Bug 1399590 - Modify the argument of nsICookiePermission::CanAccess for changing nsIURI to nsIPrincipal. r=jdm 2017-10-03 14:37:11 +08:00
Amy Chung e30f2f6227 Bug 1286858 - Data storage and interface changes for SameSite cookies. r=valentin 2017-09-25 01:27:04 +08:00
Chris Peterson 98b2f2fcd6 Bug 870698 - Part 7: Replace Insert(NS_LITERAL_CSTRING("")) with InsertLiteral(""). r=erahm
The NS_LITERAL_CSTRING macro creates a temporary nsLiteralCString to encapsulate the string literal and its length, but AssignLiteral() can determine the string literal's length at compile-time without nsLiteralCString.

MozReview-Commit-ID: DbTW5Bhd9E1

--HG--
extra : rebase_source : b27f666e5ca832d814fb6846208474e1ec66e5f4
extra : source : 9ff4e11402a9a43ed90298a9c354b0164cf9414f
2017-09-07 18:15:42 -07:00
Chris Peterson 45aa2a8e8e Bug 870698 - Part 2: Replace Append("") with AppendLiteral(""). r=erahm
MozReview-Commit-ID: CrkIP4iHP1U

--HG--
extra : rebase_source : 5dc4e91a3f1860773c199f1abf3f66479218834a
extra : intermediate-source : ba51cc79847f2b43ba616f4a5d2bbc6958ca9f6d
extra : source : 1fda2fa990cc918c748ffa14fcc5dbe13fe3bdc3
2017-09-03 22:14:11 -07:00
Bill McCloskey 47a8d9cfd8 Bug 1398420 - Don't use SystemGroup for CookieServiceChild (r=jdm)
I noticed a bug where the following can happen. The parent sends a
TrackCookiesLoad message followed by an HTTP OnStartRequest
message. When these messages are received in the child, the
TrackCookiesLoad message goes in the SystemGroup event queue and the
OnStartRequest message goes in the event queue for the relevant
tab. Unfortunately, this means that the OnStartRequest message could
run first since the queues have no guaranteed ordering.

We really should be putting the TrackCookiesLoad message in the same
queue that the OnStartRequest message goes in. I worked on that a
little bit, but it's hard to get right. For now, I would like to leave
the cookie message unlabeled. Any unlabeled message/event is totally
ordered with respect to all other messages/events, so this fixes the
bug.

MozReview-Commit-ID: KiLDAhlrbB8
2017-09-11 19:11:05 -07:00
Kris Maglione c86bc6b1ea Bug 1396676: Return already_AddRefed from cookie service GetSingleton() methods. r=jdm
These methods return an addrefed raw pointer, which makes them easy to use in
ways that cause leaks. If they're to continue returning an addrefed pointer,
they should explicitly return an already_AddRefed.

This also switches to StaticRefPtr with ClearOnShutdown for the cached
pointers for the sake of sanity.

MozReview-Commit-ID: D0lDpU8Hqug

--HG--
extra : rebase_source : 7b199070805fc0472eaf8409932517700ed23d49
2017-09-04 15:05:10 -07:00
Amy Chung 985ec17209 Bug 1376009 - Add mIPCOpen flag and check it before sending IPC messages to the parent. r=jdm
--HG--
extra : amend_source : 6ff24b1b3f4827f69f11f2d9f6213d1ed00e3ee0
2017-08-22 03:48:00 -04:00
Kershaw Chang aa86b2e80c Bug 1388247 - Use SystemGroup to label PCookieServiceChild. r=jdm 2017-08-16 00:05:00 -04:00
Junior Hsu 0ebdaee9c1 Bug 1388671 - Add null check to avoid crash. r=jduell 2017-08-09 20:39:00 -04:00
Josh Matthews 2103350e42 Bug 1331680 - Bustage fix for nsIURI changes. a=bustage 2017-08-03 09:23:43 -04:00
Amy Chung 238f1e2d3a Bug 1331680 - Part 3: Broadcast cookie changes to all content processes. r=jdm 2017-08-03 18:00:12 +08:00
Amy Chung b01732f8ca Bug 1331680 - Part 2: Use local cookie hashtable in content process, and perform cookie permission checks synchronously. r=jdm 2017-08-03 17:59:31 +08:00
Amy Chung 1f101b071c Bug 1331680 - Part 1: Send required cookies to the content process on demand. r=jdm 2017-08-03 19:00:41 +08:00
Amy Chung 62553acf94 Bug 1331680 - Part 0: Extract nsCookieKey. r=jdm 2017-08-03 17:56:33 +08:00
Masatoshi Kimura f143125cc2 Bug 1326520 - Rename nsIURI.path to pathQueryRef. r=valentin.gosu
MozReview-Commit-ID: DqJdTGopR9G

--HG--
extra : rebase_source : e8c9eb03468c075b79013b6e0bd8b367229c24cd
2017-07-29 20:50:21 +09:00
Kartikaya Gupta ba4b3b9101 Bug 1384233 - Remove SizePrintfMacros.h. r=froydnj
We have a minimum requirement of VS 2015 for Windows builds, which supports
the z length modifier for format specifiers. So we don't need SizePrintfMacros.h
any more, and can just use %zu and friends directly everywhere.

MozReview-Commit-ID: 6s78RvPFMzv

--HG--
extra : rebase_source : 009ea39eb4dac1c927aa03e4f97d8ab673de8a0e
2017-07-26 16:03:57 -04:00
Sylvestre Ledru 7c0ae251cd Bug 1381253 - Remove redundant control flow declarations rs=ehsan
MozReview-Commit-ID: FFxP4aMCbOL

--HG--
extra : amend_source : 3aec108430b11048f47ffe19d5da7ac5034770a9
2017-07-15 19:03:04 +02:00
Will Wang 1c9d3566e7 Bug 1366213: Part 1 - Add a new observer notification 'session-cookie-changed'. r=jdm
--HG--
extra : rebase_source : 5495a601b463f59f1e39746c2069c6af042a9680
2017-07-07 17:47:53 +08:00
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Nicholas Nethercote fe9268c4cd Bug 1374580 (part 2) - Remove nsAFlat{,C}String typedefs. r=froydnj.
All the instances are converted as follows.

- nsAFlatString  --> nsString
- nsAFlatCString --> nsCString

--HG--
extra : rebase_source : b37350642c58a85a08363df2e7c610873faa6e41
2017-06-20 19:19:05 +10:00
Nicholas Nethercote 1572f96f5d Bug 1374580 (part 1) - Remove nsASingleFragment{,C}String typedefs. r=froydnj.
All the instances are converted as follows.

- nsASingleFragmentString  --> nsAString
- nsASingleFragmentCString --> nsACString

--HG--
extra : rebase_source : e6a1ddc8938fecd9a735b15e872c054edf4c7910
2017-06-20 19:18:17 +10:00
Florian Quèze 66f6d259bc Bug 1374282 - script generated patch to remove Task.jsm calls, r=Mossop. 2017-06-22 12:51:42 +02:00
Valentin Gosu 8f0bfff41b Bug 1374818 - Prevent nsCookieService::AddCookieToList from adding null cookies to the list. r=jdm
MozReview-Commit-ID: IG8aXlzFMgQ

--HG--
extra : rebase_source : e95083595aa4b9741c96ea9a7e222839373db894
2017-06-21 20:31:39 +02:00
Rob Wu 1a873852ce Bug 1354229 - use private cookie DB in nsICookieManager depending on OriginAttributes r=jdm
Evaluated every method exposed via nsICookieManager and
nsICookieManager2, and ensured that every method uses the right cookie
database depending on whether the mPrivateBrowsingId flag is set in
OriginAttributes.

The usePrivateMode method has been removed since it was introduced in
bugzil.la/777620 and not used anywhere else.

This should be covered by
toolkit/components/extensions/test/mochitest/test_ext_cookies.html,
but due to bugzil.la/1309637, the relevant private browsing tests
have been disabled. These tests will be enabled in one of the next
commits.

MozReview-Commit-ID: DMhE42LGu9S

--HG--
extra : rebase_source : 7882ed7610ff4c7c6f81a7852660d2b36a5c0a92
2017-06-09 18:00:06 +02:00
Marco Bonardo 1d88de7d2f Bug 1371945 - Avoid a possible thread-safety problem with unfinalized statements. r=asuth
Avoids a thread-safety race condition on shutdown where we could try to finalize a statement twice.
Allows the async thread to be referenced until ShutdownAsyncThread, so async finalizers can make use of it.
Removes the no more useful mAsyncExecutionThreadIsAlive.
Nullifies the sqlite3_mutex pointer when the connection is closed, since it would be a dangling pointer.
Use a ScopeExit to ensure the connection and the mutex pointers are always nullified on failure.
Makes asyncClose bailout early if a Close method was already invoked before.
Makes AsyncInitDatabase not use AsyncClose to just shutdown the async thread.
Fixes various unfinalized statements in consumers code.
Makes mConnectionClosed better follow mDBConn status.
Replaces some mutex locking isClosed() calls with lockless isConnectionReadyOnThisThread.

MozReview-Commit-ID: 6sftFehsQTt

--HG--
extra : rebase_source : 2bf3088b500376e58e62e8f078d9950588adc649
2017-06-16 17:43:23 +02:00
Ryan VanderMeulen 1421659aba Backed out changeset b2fe8f4df701 (bug 1158387) for making Win64 xpcshell nearly permafail. 2017-06-12 16:45:34 -04:00
Junior Hsu 6f04204c36 Bug 1158387 - Remove "PRAGMA synchronous = OFF" to avoid corruption in cookie service. r=mak 2017-05-21 18:48:00 -04:00
Junior Hsu 96ffc639e8 Bug 1370454 - Part2: Expose runInTransaction in nsICookieService.idl, r=jduell 2017-06-06 05:36:00 +02:00
Junior Hsu 72cc7bd8e6 Bug 867798 - avoid blocking main thread when we closes nsCookieService syncConn db, r=mak
--HG--
extra : rebase_source : 04a75c1914209c14d946fbb72f8089cfb722e6c9
2017-06-08 20:06:00 +02:00
Junior Hsu 515d0e58e1 Bug 1370456 - Batch operations for nsCookieService, r=jduell
--HG--
extra : rebase_source : 0a2788a1d6d8d650f1ccdcdc4c7e875e6c5aabac
2017-06-08 20:05:00 +02:00
Junior Hsu 78f744d40d Bug 1363659 - Ensure not sending cookie service constructor when shutting down, r=ehsan 2017-05-26 03:08:00 +02:00
Ehsan Akhgari 87f01dcea3 Bug 1363311 - Honor Set-Cookie headers in multipart/mixed response boundary headers in e10s mode; r=jdm 2017-05-24 17:32:32 -04:00
Will Wang 6523b5834f Bug 1356605 - Part 1: Add an enumerator for getting session cookies only. r=valentin 2017-05-10 09:50:17 +08:00
Christoph Kerschbaumer e4f38c8d7c Bug 1362993 - Rewrite gBrowser.addTab() to use BrowserTestUtils.addTab(). r=florian 2017-05-15 21:49:50 +02:00
Jonathan Kingston d9b9a81f4e Bug 1334587 - Fix cookie store removal and updating to use originAttributes. r=baku
MozReview-Commit-ID: HpdlT4gxrl0

--HG--
extra : rebase_source : e34967207ee07f30f236402a24212eeb810c6b1b
2017-04-16 17:58:53 +01:00
Yoshi Huang db11c81921 Bug 1284579 - Part 3: remove IsPrivate arg from nsCookieService. r=valentin
Since we already passed origin attributes into these functions, we can
remove the extra isPrivate argument.
2017-05-04 09:40:21 +08:00
Tom Tromey 99f4608655 Bug 1334278 - change mozilla::Smprintf to return a UniquePtr; r=froydnj
Change mozilla::Smprintf and friends to return a UniquePtr, rather than
relying on manual memory management.  (Though after this patch there are
still a handful of spots needing SmprintfFree.)

MozReview-Commit-ID: COa4nzIX5qa

--HG--
extra : rebase_source : ab4a11b4d2e758099bd0794d5c25d799a7e42680
2017-03-03 08:17:27 -07:00
Yoshi Huang 622f14f5d9 Bug 1356165 - Log origin attributes for cookie. r=jduell
So that when I do export MOZ_LOG="cookie:3", I can also see origin attributes
of the cookie.
2017-04-17 11:08:54 +08:00
Florian Queze 37ff4fc7cc Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Sebastian Hengst a07223d699 Backed out changeset 322fde2d53bf (bug 1356569) so bug 1355161 can be backed out. r=backout 2017-04-14 23:39:22 +02:00
Ehsan Akhgari ad11e2f4ca Remove a stale comment, no bug, DONTBUILD 2017-04-14 16:03:57 -04:00
Ehsan Akhgari 95653b9117 Bug 1355631 - Cache the network.cookie.staleThreshold in nsCookie, and compute it lazily; r=jdm 2017-04-14 16:02:02 -04:00
Florian Queze 95d4d20c17 Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Andrea Marchesini e9195daa8d Bug 1345168 - Get rid of OriginAttributes::Inherit, r=tjr 2017-03-08 07:41:51 +01:00
Amy Chung fd9951f4c7 Bug 1319403 - Modified nsCookieService::FindStaleCookie() and test cases, r=jdm 2017-02-27 18:31:33 +08:00
Tom Tromey 5f8f360823 Bug 1060419 - make log_print use Printf.h, r=froydnj
MozReview-Commit-ID: BIZ1GQEZ1vs

--HG--
extra : rebase_source : 2f1f0aa12493c44f352d9a7e8683e7bb72d2d75b
2016-12-15 20:16:31 -07:00
Tom Tromey 8b46780e10 Bug 1060419 - make nsCookieService.cpp use Printf.h, r=froydnj
MozReview-Commit-ID: G2ge9NFbDV6

--HG--
extra : rebase_source : 0f83efba40734408fab3e3b523349202c7b448fb
2016-12-09 10:21:55 -10:00
Sylvestre Ledru 0b79b69876 Bug 1338086 - Remove useless else blocks in order to reduce complexity in netwerk/ r=dragana
MozReview-Commit-ID: 2TSxhHWmL2H

--HG--
extra : rebase_source : a8a70bfc3aec34b85d20021036bd2c13cdcfe5f3
2017-02-09 11:21:38 +01:00
Ehsan Akhgari c5652aad98 Bug 1339129 - Remove access to HTTP-only cookies from the child process; r=jdm 2017-02-14 10:01:47 -05:00
Sebastian Hengst ebe4ae4dc3 Backed out changeset c27179ee59e9 (bug 1339129) for failing xpcshell tests netwerk/cookie/test/unit_ipc/test_ipc_parser_0001.js and test_ipc_parser_0019.js. r=backout 2017-02-13 21:23:52 +01:00
Ehsan Akhgari cbdcae43c2 Bug 1339129 - Remove access to HTTP-only cookies from the child process; r=jdm 2017-02-13 14:08:38 -05:00
Joel Maher d85b37d5f5 Bug 1335181 - add BUG_COMPONENT to netwerk/* and dom/network/* files. r=mcmanus
MozReview-Commit-ID: AeIuBnLx6IF
2017-02-02 06:33:47 -05:00
amy f7dbfb4e81 Bug 1325909 - Added a new bucket and modify the bucket name on telemetry COOKIE_LEAVE_SECURE_ALONE, r=dveditz
--HG--
extra : rebase_source : 8e44ed82db34ca669e2736d732a4492eae6976aa
2017-01-23 18:18:47 +08:00
Florian Quèze b11907c7aa Bug 1334156 - script-generated patch to replace .ownerDocument.defaultView with .ownerGlobal, r=jaws. 2017-01-27 10:51:03 +01:00
Mark Banner 16e6d381ac Bug 503613 - Remove old 'tail =' lines from xpcshell.ini files; r=gps
MozReview-Commit-ID: 62Hp5ISxowJ

--HG--
extra : rebase_source : daa8efb3409031fea553f4fd0c9d0746e38dc308
extra : histedit_source : b4c23aacf678ba0d0ac9c09191a7c494ead11a08
2017-01-18 10:30:39 +00:00
Andrea Marchesini 359ae91eac Bug 1328653 - Merging all the various *OriginAttributes to just one, r=huseby 2017-01-12 17:38:48 +01:00
Florian Quèze fc6379e827 Bug 1329182 - remove trailing newURI null parameters in the rest of the tree, r=jaws. 2017-01-09 20:27:26 +01:00
Ehsan Akhgari 4d287a0042 Bug 1321912 - Remove the appId field from the moz_cookies table; r=jdm 2017-01-03 22:34:46 -05:00
dimi bcd217b3c0 Bug 1320402 - Move url-classifier off of using appIds. r=ehsan, gcp
MozReview-Commit-ID: IqnAVrv2c9W
2017-01-03 14:21:58 +08:00
Ehsan Akhgari fd99cf4221 Bug 1318888 - Remove a few other mentions of appId's from Necko; r=mcmanus 2016-11-21 15:00:49 -05:00
Ehsan Akhgari d07f79a266 Bug 1318210 - Remove nsIAppsService; r=baku 2016-11-17 10:41:36 -05:00
Ehsan Akhgari 1488007b30 Bug 1318206 - Remove some unused code for clearing app data; r=baku,mcmanus 2016-11-17 08:30:21 -05:00
Wes Kocher f9e9d69899 Merge inbound to m-c a=merge CLOSED TREE 2016-11-16 17:07:26 -08:00
Ehsan Akhgari eac76d9772 Bug 1310845 - Remove support for mozapp iframes; r=fabrice,jryans,baku,mcmanus
This patch removes support for mozapp iframes, leaving support for
mozbrowser iframes intact.  Some of the code has been rewritten in order
to phrase things in terms of mozbrowser only, as opposed to mozbrowser
or app.  In some places, code that was only useful with apps has been
completely removed, so that the APIs consumed can also be removed.  In
some places where the notion of appId was bleeding out of this API, now
we use NO_APP_ID.  Other notions of appId which were restricted to this
API have been removed.
2016-11-16 09:13:38 -05:00
Kan-Ru Chen f8100451db Bug 1314254 - Add mozilla::ipc::IPCResult type and convert IPDL handlers to use new return type. r=billm
We will use the new type for the generated IPDL message handler
prototype to make sure correct error handling method is called.

MozReview-Commit-ID: AzVbApxFGZ0
2016-11-15 04:26:00 +01:00
Sylvestre Ledru 3358b4e704 Bug 1317250 - Avoid a copy in nsCookieService::FindStaleCookie r=jdm
MozReview-Commit-ID: G61TtsTNU7x

--HG--
extra : rebase_source : 59d8006773a134b400a6063fa9de83f8a685161e
2016-11-14 11:01:34 +01:00
Sylvestre Ledru a8539821a2 Bug 1317430 - Avoid a unnecessary copy by passing a const & in netwerk/ r=valentin
MozReview-Commit-ID: LKgXjObeXOZ

--HG--
extra : rebase_source : b10835297d8fb345ce9ba81c94d9a7c0397a4e1d
2016-11-14 23:16:40 +01:00
amy a58ca1d174 Bug 976073 - Part 1 : Implement spec, r=jdm r=dveditz 2016-11-09 17:14:21 +08:00
Bill McCloskey d9f445e359 Bug 792652 - Get rid of CloneProtocol (r=dvander)
CloneProtocol is leftover code from Nuwa. We can remove it now.
2016-11-08 15:22:33 -08:00
Wes Kocher 4b3d16605a Backed out 18 changesets (bug 792652) for build bustage on linux64 a=backout CLOSED TREE
Backed out changeset 90eaf6aec002 (bug 792652)
Backed out changeset ddd915ab4a48 (bug 792652)
Backed out changeset 95eff6c45cae (bug 792652)
Backed out changeset 75855b5a9ab9 (bug 792652)
Backed out changeset b658ebaad5d7 (bug 792652)
Backed out changeset 2ba36b8ac60c (bug 792652)
Backed out changeset 94fcd3bf3f34 (bug 792652)
Backed out changeset cf9c4164eb43 (bug 792652)
Backed out changeset 59e6d0a4f35b (bug 792652)
Backed out changeset bdf86b8b9c43 (bug 792652)
Backed out changeset 8edf4b247250 (bug 792652)
Backed out changeset 63a3c8e4016e (bug 792652)
Backed out changeset e3e496eab991 (bug 792652)
Backed out changeset 5a1e3136323a (bug 792652)
Backed out changeset dbbe3a8c00e7 (bug 792652)
Backed out changeset 1829d5358808 (bug 792652)
Backed out changeset 004cd692ba6d (bug 792652)
Backed out changeset 92e7fee81fa2 (bug 792652)
2016-11-08 12:05:28 -08:00
Bill McCloskey 1a00da8679 Bug 792652 - Get rid of CloneProtocol (r=dvander)
CloneProtocol is leftover code from Nuwa. We can remove it now.
2016-11-08 11:32:23 -08:00
Andi-Bogdan Postelnicu c62f16bdda Bug 1311669 - Use C++11's override and remove virtual where applicable. r=valentin
MozReview-Commit-ID: Ab5BC8NhbIO
2016-11-08 16:36:58 +02:00
Sebastian Hengst db89e7fcf4 Bug 1310297 - Remove test annotations using b2g, mulet or gonk: netwerk. r=RyanVM
MozReview-Commit-ID: F2Wm2m6Wrkf

--HG--
extra : rebase_source : bcc9ccffedc16682d872cf8748c2c185bb453fa2
2016-11-05 11:29:21 +01:00
Andi-Bogdan Postelnicu 9d9d070b27 Bug 1311669 - Replace integer literals which are cast to bool. r=valentin
MozReview-Commit-ID: LdvpF0mFA5V

--HG--
extra : rebase_source : 831e71b9f40015636cbea9a6d72c96e7dfd070af
2016-11-01 14:44:10 +02:00
Andi-Bogdan Postelnicu 702a3fbf63 Bug 1311669 - replace default bodies of special member functions with = default; r=valentin
MozReview-Commit-ID: YxHWVHUyDq

--HG--
extra : rebase_source : 24dbb81862770d82a3dc139ba8041bb576cf7cc4
2016-11-01 14:44:09 +02:00
Bill McCloskey f478d1188c Bug 1306708 - Rename prio to nested in IPDL (r=dvander) 2016-10-04 20:34:54 -07:00
Bill McCloskey b83db28a45 Revert "Bug 1306708 - Rename prio to nested in IPDL (r=dvander)" on a CLOSED TREE
This reverts commit b1460c626078afbb9290e7d9ecaf3af605d5e893.
2016-10-04 15:55:19 -07:00
Bill McCloskey eddd80027c Bug 1306708 - Rename prio to nested in IPDL (r=dvander) 2016-10-04 15:28:14 -07:00
Jesper Kristensen 05fa4f284c Bug 777620 - Support access to private prowsing cookies in nsICookieManager. r=jduell
MozReview-Commit-ID: G97YHqCOpM6

--HG--
extra : rebase_source : 9faaa28f12e8e25dcf1b951fa86a1b40d65b251c
2016-03-31 18:29:27 +02:00
Andrea Marchesini a3e7227683 Bug 1280590 - nsICookieManager2.cookieExists must use the originAttributes - part 2, r=me 2016-09-30 08:30:15 +02:00
Andrea Marchesini 14d32a0990 Bug 1280590 - nsICookieManager2.cookieExists must use the originAttributes, r=smaug 2016-09-30 08:24:21 +02:00
Carsten "Tomcat" Book c89ca66d22 Backed out changeset 826cc48624a3 (bug 1280590) for windows m-oth and xpc crashes
--HG--
extra : rebase_source : 895634096f3c1e275ab4f74f1d93691f5b55e22c
2016-09-29 15:28:53 +02:00
Andrea Marchesini f69927d55d Bug 1280590 - nsICookieManager2.cookieExists must use the originAttributes, r=smaug 2016-09-29 12:02:30 +02:00
Carsten "Tomcat" Book baff2f0613 Backed out changeset 885e361d4c73 (bug 1280590) for xpcshell bustage 2016-09-28 15:08:45 +02:00
Andrea Marchesini cd5d3f1870 Bug 1280590 - nsICookieManager2.cookieExists must use the originAttributes, r=smaug 2016-09-28 08:05:12 +02:00
Umesh Panchaksharaiah 056d5a6135 Bug 1301629 - Fix incorrect parameter name in comments. r=ettseng
--HG--
extra : rebase_source : a45c6c9641ceb70301e8bcd957a3e21c95aef423
2016-09-14 19:57:20 +02:00
Josh Matthews 7784aa2e51 Bug 1302824 - Avoid duplicating domain-matching and path-matching logic in cookie service. r=ehsan 2016-09-19 15:40:12 -04:00
Jonathan Hao 108459bd3b Bug 1272856 - Fix intermittent e10s browser_originattributes.js r=ehsan
--HG--
extra : rebase_source : 5b17628829673c1174273ef6423a062912d10ca2
2016-09-13 03:06:00 +02:00
Yoshi Huang 1b06918946 Bug 1301406 - replace SerializedLoadContext with NeckoOriginAttributes. r=smaug, ehsan, jduell
SerializedLoadContext carries the origin attributes of the docshell to
parent process. However document could have different origin attributes
than the docshell's. And the origin attributes of the document comes
from the LoadInfo of the channel.
So we replace SerializedLoadContext with NeckoOriginAttributes, which is from
the loadInfo of the channel, therefore parent can get the correct origin
attributes from the document.
2016-09-20 14:24:23 +08:00
Josh Matthews 3b4eeee788 Bug 1264192 - Adjust cookie eviction heuristics when exceeding the maximum cookies allowed per host. r=ehsan
If no expired cookies exist, in order of preference, evict the oldest:
* session cookie with a non-matching path
* session cookie with a matching path
* non-session cookie with a non-matching path
* non-session cookie with a matching path

This replaces the previous heuristic of evicting the oldest cookie, irregardless of any other attributes,
if no expired cookies were present. This ensures that cookies that are already considered transient by
web applications will be removed first, followed by cookies that are unrelated to the response that is
adding new cookies.
* * *
Bug 1264192 - Interdiff
2016-09-09 16:29:15 -04:00
Sebastian Hengst 80e39088f2 Backed out changeset 2ecd402d3934 (bug 1264192) for frequent failure in netwerk/cookie/test/unit/test_eviction.js. r=backout 2016-09-04 15:07:24 +02:00
Tim Huang 55292e77a0 Bug 1278037 - Part 1: Modify the getCookiesWithOriginAttributes of the nsICookieManager2 to take the host as an optional argument. r=jdm
--HG--
extra : rebase_source : 918c1f81dedb5dfa6ddb9a78b613ace6f34f4758
extra : histedit_source : f28df59c4b608f7311e04dc00bce286624d7ad81
2016-07-28 11:46:04 +08:00
Josh Matthews 64a98fc3b7 Bug 1264192 - Adjust cookie eviction heuristics when exceeding the maximum cookies allowed per host. r=ehsan
If no expired cookies exist, in order of preference, evict the oldest:
* session cookie with a non-matching path
* session cookie with a matching path
* non-session cookie with a non-matching path
* non-session cookie with a matching path

This replaces the previous heuristic of evicting the oldest cookie, irregardless of any other attributes,
if no expired cookies were present. This ensures that cookies that are already considered transient by
web applications will be removed first, followed by cookies that are unrelated to the response that is
adding new cookies.

--HG--
extra : amend_source : f79ba9dd393a3f37760e643b10b7137e37a6397a
2016-08-26 18:04:47 -04:00
Nicholas Nethercote b71747b2ac Bug 1299727 - Rename NS_WARN_IF_FALSE as NS_WARNING_ASSERTION. r=erahm.
The new name makes the sense of the condition much clearer. E.g. compare:

  NS_WARN_IF_FALSE(!rv.Failed());

with:

  NS_WARNING_ASSERTION(!rv.Failed());

The new name also makes it clearer that it only has effect in debug builds,
because that's standard for assertions.

--HG--
extra : rebase_source : 886e57a9e433e0cb6ed635cc075b34b7ebf81853
2016-09-01 15:01:16 +10:00
Sumit Tiwari 054b2202b0 Bug 1298512 - Remove aRequireHostMatch to nsCookieService::CheckPrefs; r=jdm
MozReview-Commit-ID: 2SdJhbJtBDO

--HG--
extra : rebase_source : 1c19d0de7f2c8052a7691d474a864e260c35daba
2016-08-26 21:42:04 -04:00
James Andreou 4c787b8989 Bug 1282882 - Remove LoadContextInfo and LoadContext private browsing flags; r=jdm,mayhemer 2016-08-26 13:06:48 -04:00
Nicholas Nethercote c2306345d5 Bug 1297658 - Avoid unnecessary checking in memory reporters. r=erahm.
This patch removes checking of all the callback calls in memory reporter
CollectReport() functions, because it's not useful.

The patch also does some associated clean-up.

- Replaces some uses of nsIMemoryReporterCallback with the preferred
  nsIHandleReportCallback typedef.

- Replaces aCallback/aCb/aClosure with aHandleRepor/aData for CollectReports()
  parameter names, for consistency.

- Adds MOZ_MUST_USE/[must_use] in a few places in nsIMemoryReporter.idl.

- Uses the MOZ_COLLECT_REPORT macro in all suitable places.

Overall the patch reduces code size by ~300 lines and reduces the size of
libxul by about 37 KiB on my Linux64 builds.

--HG--
extra : rebase_source : e94323614bd10463a0c5134a7276238a7ca1cf23
2016-08-24 15:23:45 +10:00
Jason Duell 603d8711c3 Bug 1005184 - Clarify comments in Necko ActorDestroy functions clarifying that nothing needs to be implemented. r=jduell
--HG--
extra : rebase_source : fce9be11972f5117cf85a326d0d31a746f11df41
2016-08-23 16:21:00 -04:00
Kan-Ru Chen b6d880aca1 Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj
The patch is generated from following command:

  rgrep -l unused.h|xargs sed -i -e s,mozilla/unused.h,mozilla/Unused.h,

MozReview-Commit-ID: AtLcWApZfES


--HG--
rename : mfbt/unused.h => mfbt/Unused.h
2016-08-24 14:47:04 +08:00
Kan-Ru Chen 429b0cc56b Bug 1295103 - Check OriginAttributes::PopulateFromSuffix return value in nsCookieService. r=mayhemer
MozReview-Commit-ID: 8aN6faugiqq

--HG--
extra : rebase_source : 6a779feec1845f1b1f0154641136368c494dc42a
2016-08-15 18:18:19 +08:00
amy 819f6f556d Bug 368964 - Cookie expires attribute should be absolute, not relative to server time. r=ehsan 2016-08-19 17:28:09 +08:00
Nicholas Nethercote bab6d17ebf Bug 1293117 (part 4) - Change many NS_IMETHODIMP occurrences to NS_IMETHOD. r=froydnj.
This patch makes the following changes on many in-class methods.

- NS_IMETHODIMP F() override;      --> NS_IMETHOD F() override;
- NS_IMETHODIMP F() override {...} --> NS_IMETHOD F() override {...}
- NS_IMETHODIMP F() final;         --> NS_IMETHOD F() final;
- NS_IMETHODIMP F() final {...}    --> NS_IMETHOD F() final {...}

Using NS_IMETHOD is the preferred way of marking in-class virtual methods.
Although these transformations add an explicit |virtual|, they are safe --
there's an implicit |virtual| anyway because |override| and |final| only work
with virtual methods.

--HG--
extra : rebase_source : 386ee4e4ea2ecd8d5001efabc3ac87b4d6c0659f
2016-08-08 10:54:47 +10:00
Tom Tromey 5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06:00
Chris Peterson b175c9fdd5 Bug 1277106 - Part 2: Expand MOZ_UTF16() strings to u"" string literals. r=Waldo 2016-07-20 22:03:25 -07:00
Daniel Veditz d6202de12b Bug 1283368 - Implement cookie prefixes spec, r=valentin r=amchung 2016-06-29 22:42:36 -07:00
Jarda Snajdr 7d691d831b Bug 1194208 - Remove storage inspector stores-reloaded event. r=mratcliffe 2016-07-04 02:48:00 +02:00
Ralph Giles 2635086221 Bug 1275744 - Reference MOZ_LOG in netwerk comments. r=erahm
NSPR_LOG_MODULES is deprecated.

Programs in the test directory still use PR_NewLogModule,
so NSPR_LOG_MODULES is accurate for them. Getting these
to link against libxul for LazyLogModule is still to do,
so leave those for now.

MozReview-Commit-ID: 3uMR3YPJyyi

--HG--
extra : rebase_source : a94c6392cb0de1b6d6324b192954f48f784e8cbe
2016-05-25 16:13:54 -07:00
Valentin Gosu 704a204aff Bug 1276442 - Backout 6647b13a6ad9 (Bug 219157) a=backout 2016-05-30 16:05:21 +02:00
Tim Huang c4f79ec32f Bug 1267910 - Part 3: Add test cases for add() and getCookiesFromHost() of the nsICookieManager2. r=jdm
--HG--
extra : rebase_source : d99511c519fd305177b8b55c17f7c2a2e6dd44ce
2016-05-25 11:54:22 +08:00
Tim Huang cc903e433a Bug 1267910 - Part 1: Make the API getCookiesFromHost of the nsICookieManager2 OriginAttributes-aware. r=jdm
--HG--
extra : rebase_source : 18945a3aac4c331a1513ac402553d725cf334b76
2016-05-25 11:54:21 +08:00
mitchdevel ce5b229c18 Bug 219157 - Fix to prevent 3rd party sites from getting cookies r=valentin
MozReview-Commit-ID: A0ltsuDnxnf
2016-05-20 16:48:00 +02:00
Wes Kocher 2596f34110 Backed out 3 changesets (bug 1267910) for reports of it breaking session restore a=backout
Backed out changeset 5962f8e6d030 (bug 1267910)
Backed out changeset f8afc5cf9e0e (bug 1267910)
Backed out changeset cc202e0ac0dd (bug 1267910)
2016-05-20 21:15:17 -07:00
Tim Huang bfd4ca4961 Bug 1267910 - Part 3: Add test cases for add() and getCookiesFromHost() of the nsICookieManager2. r=jdm
--HG--
extra : rebase_source : c81c3692ee7203e0023e7e2aab42c5ca1cad1b87
2016-05-18 20:44:00 -04:00
Tim Huang 589b71d649 Bug 1267910 - Part 1: Make the API getCookiesFromHost of the nsICookieManager2 OriginAttributes-aware. r=jdm
--HG--
extra : rebase_source : a36d46df6a43f2a1283bf4c2f55b0d2247c98673
2016-05-13 02:29:00 -04:00
Chris Peterson 353ee65255 Bug 1272513 - Part 1: Suppress -Wshadow warnings-as-errors in some directories. r=glandium 2016-05-11 00:00:01 -07:00
Ethan Tseng 7bf2d7f142 Bug 1214071 - Replace Get/RemoveCookiesForApp() with Get/RemoveCookiesWithOriginAttributes() r=ehsan
MozReview-Commit-ID: JTi1BwBVvyA
2016-01-08 17:58:56 +08:00
Jonathan Hao 9b7088faeb Bug 1214071 - Tests for Get/RemoveCookiesWithOriginAttributes() r=ehsan
MozReview-Commit-ID: 5kqqfI9OdVn
2016-05-12 10:12:47 +08:00
Tim Huang 7d71e717c7 Bug 1270423 - Fix the nsICookieManager.remove() to reference originAttributes correctly at release build. r=ehsan 2016-05-05 09:12:00 +02:00
Nicholas Nethercote 2511b2c327 Bug 1267550 (part 2) - Rename MOZ_WARN_UNUSED_RESULT as MOZ_MUST_USE. r=froydnj.
It's an annotation that is used a lot, and should be used even more, so a
shorter name is better.

MozReview-Commit-ID: 1VS4Dney4WX

--HG--
extra : rebase_source : b26919c1b0fcb32e5339adeef5be5becae6032cf
2016-04-27 14:16:50 +10:00
Chris Peterson 7f019cfba6 Bug 1160368 - Part 2: Clean up some cruft in nsCookie.h from PRBool/bool conversions. r=jdm
Also make nsCookie's member variables private.
2016-02-20 22:22:35 -08:00
Andrea Marchesini 83a08cd72e Bug 1259169 - nsICookieManager::remove() should be back-compatible, r=jdm 2016-04-10 05:46:07 +01:00
Ryan VanderMeulen 1c7872d0af Backed out changeset 7d5f1e9ce04c (bug 1259169) for various cookie-related crashes and test failures. 2016-04-09 15:36:07 -04:00
Andrea Marchesini d09d8959fe Bug 1259169 - nsICookieManager::remove() should be back-compatible, r=jdm 2016-04-09 19:09:49 +01:00
Carsten "Tomcat" Book 78d9f80444 Backed out changeset 74330da56b82 (bug 1259169) for assertion failures in nsCookieService.cpp:2390 2016-04-08 14:47:39 +02:00
Andrea Marchesini 87827f2189 Bug 1259169 - nsICookieManager::remove() should be back-compatible, r=jdm 2016-04-08 12:38:15 +01:00
Chris Manchester f7a1b3fb60 Bug 1242051 - Add inter-directory test support file dependencies to ini manifests. r=gps
Previously, every test and support file would be synced to the objdir
when running any test. Now that only those support files and tests requested
are synced, we note support files required beyond those in a test's
directory in ini manifests.

MozReview-Commit-ID: EmlDz9d4lqt
2016-04-04 14:56:52 -07:00
Steven Low 6ce7b12959 Bug 1247548 - Changed nsCookieService::EnsureReadComplete and nsCookieService::PurgeCookeis to allocate nsTArray instead of AutoTArray. r=jdm 2016-03-02 19:56:00 -05:00
Christoph Kerschbaumer f29ec8d62f Bug 1254689 - Remove SEC_NORMAL where loadingPrincipal is SystemPrincipal or NullPrincipal. r=sicking 2016-03-09 13:55:59 -08:00
Wes Kocher 817d8829fc Backed out changeset 7cbab9ec76d5 (bug 1254689) for browser_dbg_addon-sources.js failures
MozReview-Commit-ID: 3zPliH7mmPj

--HG--
extra : rebase_source : 90a6c96c2106ec23043160ed93041cd7e15b1640
2016-03-09 10:56:23 -08:00
Christoph Kerschbaumer 007c074be0 Bug 1254689 - Remove SEC_NORMAL where loadingPrincipal is SystemPrincipal or NullPrincipal (r=sicking)
MozReview-Commit-ID: LKK3MGMODNI
2016-03-09 09:01:45 -08:00
J. Ryan Stinnett 2a55d065b7 Bug 1238160 - Rename OriginAttributes.mInBrowser and associated methods. r=bz,mayhemer
This change renames OriginAttributes.mInBrowser to mInIsolatedMozBrowser and
nsIPrincipal::GetIsInBrowserElement to GetIsInIsolatedMozBrowserElement.  Other
methods that pass these values around also have name changes.

Tokens such as "inBrowser" have previously been serialized into cache keys, used
as DB column names, stored in app registries, etc.  No changes are made to any
serialization formats.  Only runtime method and variable names are updated.

No behavior changes are made in this patch, so some renamed methods may have
nonsensical implementations.  These are corrected in subsequent patches
focused on behavior.

MozReview-Commit-ID: 66HfMlsXFLs
2016-03-02 10:35:56 -06:00
Andrea Marchesini b1768e7ec3 Bug 1245184 - Update mochitests, r=me 2016-02-25 16:41:13 +01:00
Andrea Marchesini 8cd3c16e81 Bug 1245184 - nsICookieManager.removeNative for TestCookie cppunittest, r=smaug 2016-02-25 16:41:13 +01:00
Andrea Marchesini ed31fee8d4 Bug 1245184 - nsICookieManager.remove should use the OriginAttributes, r=sicking 2016-02-25 16:41:13 +01:00
Carsten "Tomcat" Book f2a98554ec Backed out changeset 27f3968ae8b2 (bug 1245184) 2016-02-19 15:55:23 +01:00
Andrea Marchesini 0a72c5e9e3 Bug 1245184 - CookieManager should remove cookies only if they match the userContextId, r=sicking 2016-02-19 14:49:50 +01:00
Nicholas Hurley 07a85c1de1 Bug 1244505 - Allow spaces in cookie names. r=mcmanus
--HG--
extra : commitid : JRYohkoM9zL
extra : rebase_source : 8be51c60e2153d4332a617d40d5ba6923bb24a26
extra : histedit_source : 2a2b22cce13db92c4db24763c412d837fe3af37a
2016-02-01 09:46:24 -08:00
Birunthan Mohanathas d7371d07d0 Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-02-02 17:36:30 +02:00
Phil Ringnalda d381b4bca6 Back out 7 changesets (bug 1235261) for cpptest failures in TestTArray
CLOSED TREE

Backed out changeset d66c3f19a210 (bug 1235261)
Backed out changeset 467d945426bb (bug 1235261)
Backed out changeset 32b61df13142 (bug 1235261)
Backed out changeset c50bb8ed4196 (bug 1235261)
Backed out changeset 0ff0fa6fe81f (bug 1235261)
Backed out changeset df70e89669da (bug 1235261)
Backed out changeset 064969357fc9 (bug 1235261)
2016-01-31 10:10:57 -08:00
Birunthan Mohanathas 373593275e Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-01-31 17:12:12 +02:00
Bill McCloskey c663839ade Bug 1240871 - Don't allow implicit "async" in IPDL (r=mccr8,billm) 2016-01-28 20:56:37 -08:00