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

1331 Коммитов

Автор SHA1 Сообщение Дата
Junior Hsu 414c3e5987 Bug 1415120 - Part2: crash test for cookie db rebuild, r=nwgh
--HG--
extra : rebase_source : 72c160028d5f718166161a9d05948e00b9939476
2017-11-15 20:04:00 +02:00
Neil Deakin 9bd9459ef2 Bug 380637, add a general preference to prevent pages from overriding keyboard shortcuts. If a key doesn't specify the reserved attribute, this preference will be used, r=felipe 2017-11-09 18:42:39 -05:00
Marco Bonardo bf0b20593d Bug 1403009 - Intermittent failure in browser_test_favicon.js. r=kershaw
MozReview-Commit-ID: 9phZS4o5FC8

--HG--
extra : rebase_source : efde3a0acbbd92d26b033aaafd65bc11d97f13d2
2017-11-06 21:35:49 +01: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
Kris Maglione 257d9118dc Bug 1409249: Require singleton constructors to return explicit already_AddRefed. r=froydnj
Right now, NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR expects singleton
constructors to return already-addrefed raw pointers, and while it accepts
constructors that return already_AddRefed, most existing don't do so.

Meanwhile, the convention elsewhere is that a raw pointer return value is
owned by the callee, and that the caller needs to addref it if it wants to
keep its own reference to it.

The difference in convention makes it easy to leak (I've definitely caused
more than one shutdown leak this way), so it would be better if we required
the singleton getters to return an explicit already_AddRefed, which would
behave the same for all callers.


This also cleans up several singleton constructors that left a dangling
pointer to their singletons when their initialization methods failed, when
they released their references without clearing their global raw pointers.

MozReview-Commit-ID: 9peyG4pRYcr

--HG--
extra : rebase_source : 2f5bd89c17cb554541be38444672a827c1392f3f
2017-10-16 21:08:42 -07: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
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
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
Johann Hofmann a98b34501b Bug 1379560 - Part 1 - Add a default permission pref in the permission manager. r=mystor,Paolo
This patch enables support for setting prefs with the pattern
permissions.default.* to provide a custom default permission
for arbitrary permission types in nsPermissionManager.

The previous default of UNKNOWN_ACTION is honored if no pref is set.

A default value is provided if no permission entry can be found in the db.
Accordingly, the patch does not affect the behavior of functions
that return permission objects from the db such as GetPermissionObject,
which returns null if no entry was found.

MozReview-Commit-ID: 3JECI6kXqGf

--HG--
extra : rebase_source : 9fbcfc740a85c02cf4245956e69ae13c8f90b5ab
2017-07-10 23:13:43 +02:00
Kris Maglione bd6d63772a Bug 1407428: Hand out a const array reference for expanded principal whiteList. r=krizsa
The current API makes the life time and ownership of the result array unclear
without careful reading. The result array is always owned by the principal,
and its lifetime tied to the lifetime of the principal itself. Returning a
const array reference makes this clear, and should prevent callers from
accidentally modifying the returned array.

MozReview-Commit-ID: 3f8mhynkKAj

--HG--
extra : source : 237acf2879f6222bc4b076c377bf026d18a6ebef
extra : amend_source : dfaf6e88e3c4758f7fdcf7fb422d457edafab1b7
2017-10-10 15:00:16 -07:00
Sebastian Hengst 11a2b8ef67 Backed out changeset 237acf2879f6 (bug 1407428) for frequent crashes, e.g. in xpcshell's test_bug248970_cookie.js. r=backout on a CLOSED TREE
--HG--
extra : amend_source : 1ccac4fb953566239cba8db7d6f8bdca4ce48b35
2017-10-16 00:00:15 +02:00
Kris Maglione 7d8f8ea3d6 Bug 1407428: Hand out a const array reference for expanded principal whiteList. r=krizsa
The current API makes the life time and ownership of the result array unclear
without careful reading. The result array is always owned by the principal,
and its lifetime tied to the lifetime of the principal itself. Returning a
const array reference makes this clear, and should prevent callers from
accidentally modifying the returned array.

MozReview-Commit-ID: 3f8mhynkKAj

--HG--
extra : rebase_source : d2a5e0862f8c964fb5a3e46b50c2e9629b218699
extra : amend_source : 27d7a7ef5da6fe2aa1104009b6ee067465db73e1
2017-10-10 15:00:16 -07:00
Nathan Froyd 92d68b33b6 Bug 1406485 - provide PermissionHashKey with a move constructor; r=ehsan 2017-10-09 10:39:38 -04: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 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
Chris Peterson 9f4c1f5278 Bug 870698 - Part 1: Replace Assign("") with AssignLiteral(""). r=erahm
MozReview-Commit-ID: A0u9PP49OW3

--HG--
extra : rebase_source : 7d5286959f510eb4b7df1b7e32d5b9b58719c48b
extra : intermediate-source : f552b4a78236c42bc09030b3eb008725a3edb9c8
extra : source : 26ac4a1014f6661a70e3bf9f552407e12c2c3981
2017-09-03 22:12:56 -07:00
Nicholas Nethercote f582d96b98 Bug 1390428 (part 9) - Remove nsXPIDLCString. r=erahm.
This is straightforward, with only two notable things.

- `#include "nsXPIDLString.h" is replaced with `#include "nsString.h"`
  throughout, because all nsXPIDLString.h did was include nsString.h. The
  exception is for files which already include nsString.h, in which case the
  patch just removes the nsXPIDLString.h inclusion.

- The patch removes the |xpidl_string| gtest, but improves the |voided| test to
  cover some of its ground, e.g. testing Adopt(nullptr).

--HG--
extra : rebase_source : 452cc4a08046a1adb1a8099a7e85a1917de5add8
2017-08-17 15:29:03 +10:00
Michael Layzell 4f71ca4422 Bug 1379345 - Transmit permissions for view-source URIs, r=ehsan 2017-08-18 12:38:04 -04:00
Eric Rahm fe18bf0131 Bug 1386825 - Part 4: Remove remaining instances of MOZ_B2G. r=froydnj
MozReview-Commit-ID: 8r4eMwiZ4Vg
2017-08-08 14:41:09 -07:00
Nicholas Nethercote 72c884bf74 Bug 1384835 (part 3, attempt 2) - Remove the Preferences::Get*CString() variants that return nsAdoptingCString. r=froydnj.
--HG--
extra : rebase_source : d317b25be2ec21d1a60d25da3689e46cdce0b649
2017-07-31 14:28:48 +10: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
Michael Layzell 3fa953af9c Bug 1315092 - Part 2: Correctly clear mPrivateBrowsingId during the assertion as well on a CLOSED TREE, a=bustage
MozReview-Commit-ID: J8j4DWUzl8D
2017-07-05 13:41:48 -04:00
Michael Layzell c96029382b Bug 1315092 - Correctly ignore mPrivateBrowsingId when constructing permission keys, r=ehsan
MozReview-Commit-ID: 3uCvKE5MxR5
2017-07-05 12:41:13 -04:00
Florian Quèze 2924991bf6 Bug 1368456 - remove Promise.jsm imports in tests, r=mconley. 2017-06-23 11:25:52 +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
Michael Layzell b213d28b54 Bug 1374665 - Stop parsing principals during GetPermissionsForKey, r=ehsan
MozReview-Commit-ID: 28BCIqA2Kf2
2017-06-22 14:46:18 -04:00
Florian Quèze 5b8f8b884c Bug 1374282 - script generated patch to remove Promise.defer calls, r=Mossop. 2017-06-22 12:51:42 +02: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
Wes Kocher 3902194bb4 Backed out changeset 44532a19e524 (bug 1374665) for test_group_mouseevents.html failures a=backout
MozReview-Commit-ID: BNCBrA8XhRV

--HG--
extra : source : cbeb4bc60daa798c60102102c15e51a5af94265a
2017-06-21 17:10:40 -07:00
Michael Layzell 5d8224bf06 Bug 1374665 - Stop parsing principals during GetPermissionsForKey, r=ehsan
MozReview-Commit-ID: 28BCIqA2Kf2
2017-06-21 14:23:18 -04: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
Masatoshi Kimura 3231cb3535 Bug 1372886 - Remove dead parameters from nsIConverterInputStream.init(). r=hsivonen
MozReview-Commit-ID: GliLHLsUWjt

--HG--
extra : rebase_source : 50d3f4680a498125ddf600b0d64f6740b0229f80
2017-06-17 19:30:09 +09:00
Junior Hsu 96ffc639e8 Bug 1370454 - Part2: Expose runInTransaction in nsICookieService.idl, r=jduell 2017-06-06 05:36:00 +02:00
Junior Hsu ca036ac022 Bug 1370454 - Part1: remove dup test in test_cookie_async_failure.js, r=mak 2017-06-06 12:06:02 +08:00
JW Wang 1f5623c523 Bug 1365513 - Remove the call to AbstractThread::GetCurrent() in nsPermissionManager.cpp. r=mystor
See bug 1365483 for the rationale.

MozReview-Commit-ID: 4sWodnP5MYZ

--HG--
extra : rebase_source : 6a32073e50695ac8f4a540c83f9d2b5542b53585
extra : intermediate-source : 5d7189453d82844d55e3d90c79792b2edd7bdd0d
extra : source : 8b029c32f3512c9d8e92582312459a501594a6e8
2017-05-18 14:14:27 +08:00
Ehsan Akhgari 214e03003f Bug 1362791 - Enable testing permissions using URIs without having to mint principals; r=mystor
The permissions manager store uses principal origins with suffix in the
key entry, but for the API entry points where we accept a raw nsIURI, we
currently mint a new codebase principal with a blank OriginAttributes
only to read out the origin string effectively, since the suffix is
guaranteed to always be an empty string in this case.

This can be slow, so this patch adds a fast path to bypass minting a new
principal and uses ContentPrincipal::GenerateOriginNoSuffixFromURI() to
generate the origin string from the input nsIURI directly.
2017-05-20 00:59:09 -04:00
Michael Layzell d50b0587a8 Bug 1363243 - Avoid checking nsPermissionManager in nsContentBlocker when no preload permissions are set, r=ehsan
MozReview-Commit-ID: B8A8QXie8SX
2017-05-11 10:06:25 -04:00
Michael Layzell d9adddc93f Bug 1355608 - Part 1: Add tools to nsPermissionManager to await permissions becoming avaliable, r=baku
MozReview-Commit-ID: 1HDS8zw6dpF
2017-04-27 13:41:13 -04:00
Michael Layzell 4966d64d16 Bug 1353179 - Fix the content process permission assertion, and add support for pre-load permissions, r=baku
MozReview-Commit-ID: DAVPue8krnH
2017-04-27 13:41:11 -04:00
Michael Layzell ab79668929 Bug 1354635 - Send permissions to the content process when debugging service workers, r=catalinb
MozReview-Commit-ID: 8cUh5znQcFN
2017-04-18 14:38:56 -04:00
Florian Queze f935ddc4b3 Bug 1356569 - Remove notifyObservers' last parameter when it is falsy, r=jaws. 2017-04-14 21:51:39 +02: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
Sebastian Hengst 738d097aae Backed out changeset 55f3df15eaa6 (bug 1356569) 2017-04-14 23:39:17 +02:00
Florian Queze 3c564a2b02 Bug 1356569 - Remove notifyObservers' last parameter when it is falsy, r=jaws. 2017-04-14 21:51:39 +02:00