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

627 Коммитов

Автор SHA1 Сообщение Дата
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