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

5043 Коммитов

Автор SHA1 Сообщение Дата
Geoff Brown cbb956e0c3 Bug 1407679 - Merge nsIIOService and nsIIOService2; r=nwgh 2017-11-10 07:03:36 -07:00
Andrea Marchesini b71cdc9eb5 Bug 1415081 - part 0 - NS_ReadInputStreamToString must support nsIAsyncInputStream, r=smaug 2017-11-09 11:18:08 +01:00
Sebastian Hengst e3806002a1 merge mozilla-central to mozilla-inbound. r=merge a=merge on a CLOSED TREE 2017-11-09 00:32:30 +02:00
Christoph Kerschbaumer 6584da597b Bug 1407891: Allow view-image to open a data: URI by setting a flag on the loadinfo. r=bz 2017-11-08 20:01:41 +01:00
Valentin Gosu 132162d150 Bug 1415206 - Remove RustURL from Gecko r=bagder
This class isn't being used right now, and MozURL is a much better alternative if interaction with rust URLs is required.

MozReview-Commit-ID: ADdYRrrTnr6

--HG--
extra : rebase_source : b36aa26c20e7daaadab1f3360bab0ed4681eb7f8
2017-11-07 17:11:08 +01:00
Kris Maglione 27c96362b9 Bug 1412345: Downgrade expanded principals before inheriting. r=bz,krizsa
There are several ways that expanded principals can be used as triggering
principals for requests. While that works fine for security checks, it also
sometimes causes them to be inherited, and used as result principals in
contexts where expanded principals aren't allowed.

This patch changes our inheritance behavior so that expanded principals are
downgraded to the most appropriate constituent principal when they would
otherwise be inherited.

The logic for choosing the most appropriate principal is a bit suspect, and
may eventually need to be changed to always select the last whitelist
principal, but I chose it to preserve the current principal downgrade behavior
used by XMLHttpRequest for the time being.

MozReview-Commit-ID: 9fvAKr2e2fa

--HG--
extra : rebase_source : c30df1b3851c11fed5a1d6a7fb158cec14933182
2017-11-02 19:56:27 -07:00
Christoph Kerschbaumer 3d0a1f002e Bug 1403814 - Block toplevel data: URI navigations only if openend in the browser. r=smaug 2017-11-03 13:23:11 +01:00
Andrea Marchesini eb54ec6bb0 Bug 1413901 - Move rust-url-capi.h include in the MozURL.cpp, r=valentin 2017-11-02 19:14:41 +01:00
Andrea Marchesini cb5eb53200 Bug 1412497 - nsBufferedInputStream should call the nsIInputStreamCallback when closed, r=smaug 2017-11-02 11:26:35 +01:00
Nicholas Nethercote 9252435548 Bug 1410794 (attempt 2) - Change some |string| occurrences in nsIPrefBranch.idl to |ACString|. r=erahm.
This makes the code nicer. In particular, it removes many getter_Copies()
calls. The patch also converts a lot of nsCStrings to nsAutoCString, which will
avoid heap allocation in the common case.

The patch also renames PREF_CopyCharPref() as PREF_GetCStringPref(), because
it's actually getting a string, not a char, and that matches the existing
GetCString() and GetDefaultCString() methods. Correspondingly, it also renames
PREF_SetCharPref() as PREF_SetCStringPref().

The |aPrefName| arguments in nsIPrefBranch.idl remain as |string| because they
almost always involve passing in C string literals, and passing "foo" is much
nicer than passing NS_LITERAL_CSTRING("foo").

It's worth noting that early versions of this patch used |AUTF8String| instead
of |ACString|. But it turns out that libpref stores prefs internally as Latin1.
And |ACString| is compatible with Latin1 but |AUTF8String| isn't, because
non-ASCII Latin1 strings are not valid UTF-8!

MozReview-Commit-ID: D3f7a1Vl1oE

--HG--
extra : rebase_source : e6e4b15d6d210cfd93686f96400281f02bd1d06b
2017-10-27 10:30:33 +11:00
Jorg K e4e37ae9d0 Bug 1412497 - fix test for buffered input stream. r=baku 2017-10-29 08:59:26 +01:00
Andrea Marchesini 49ab2e14c3 Bug 1411939 - nsInputStreamPump should avoid the use of nsIAsyncInputStream and nsIBufferedInputStream at the same time, r=smaug 2017-10-27 09:05:48 +02:00
Sebastian Hengst b181c484ad merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: LcCWQzgwIBi
2017-10-26 23:57:40 +02: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
Valentin Gosu 1f08f89c63 Bug 1411932 - rusturl_get_path should not depend on cannot-be-a-base r=baku
MozReview-Commit-ID: 7iwBooZWNxW

--HG--
extra : rebase_source : b6622e1c4270629f44f0d263847c47bc06ffb60f
2017-10-26 14:46:25 +02:00
Sebastian Hengst 443416f881 Merge mozilla-central to autoland. r=merge a=merge 2017-10-26 00:39:55 +02:00
Valentin Gosu 6814810f38 Bug 1409405 - Implement MozURL::GetOrigin r=mayhemer
MozReview-Commit-ID: H1X0dAOyij1

--HG--
extra : rebase_source : f47595f7a3beed55f68c6a6a27f5a78d1ab3da5b
2017-10-25 18:03:05 +02:00
Valentin Gosu cd4a91befe Bug 1410063 - Implement MozURL::GetHostPort/SetHostPort r=mayhemer
MozReview-Commit-ID: 2wXsvmHf60

--HG--
extra : rebase_source : bdadc78db1cb135a65cfae0ae39b6073c962b85e
2017-10-25 17:35:47 +02:00
Sebastian Hengst 24b7b2eb7c merge mozilla-central to autoland. r=merge a=merge 2017-10-24 23:59:14 +02:00
Alex Gaynor 4374c58da3 Bug 1411255 - Fixed unnecessary mut warning; r=valentin
MozReview-Commit-ID: 9MDk0LlA6uR

--HG--
extra : rebase_source : bc5dac8e99d26dbec2385ad781026df75992206e
2017-10-24 09:42:28 -04: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
Nicholas Hurley 846734c853 Bug 1409542 part 2 - telemetry on why a resource marked prefetchable is not prefetched. r=francois,valentin
MozReview-Commit-ID: AFJnbTjU5Ju

--HG--
extra : rebase_source : 6207e04a5b3ea932ddc87ad9c0830ea1633ac39a
2017-10-20 12:58:30 -07:00
Nicholas Hurley 1790ba950b Bug 1409542 part 1 - telemetry on why a resource is marked prefetchable or not. r=francois,valentin
MozReview-Commit-ID: IdSyFv8RSbY

--HG--
extra : rebase_source : cdcf6456ff5ed8f895942e3a7bf92b6c04b63cf4
2017-10-17 14:46:56 -07:00
Sebastian Hengst 1ead0a96a9 Backed out changeset dab1c5badddb (bug 1407679) for failing server startup in mochitests on Android. r=backout on a CLOSED TREE
--HG--
extra : amend_source : 3dc4cb2bbaf55f3f6329687ce64d4e862fc3800b
2017-10-24 21:18:26 +02:00
Valentin Gosu 9dd47ebf50 Bug 1407679 - Merge nsIIOService and nsIIOService2 r=nwgh
Removes deprecated nsIIOService2.newChannelFromURIWithProxyFlags

MozReview-Commit-ID: Gr3nA25kcre

--HG--
extra : rebase_source : 3407b5ed0f8f7067523abee28c137db3cac86b14
2017-10-20 16:41:07 +02:00
Gregory Szorc 42583ae0bc Bug 1403213 - Update another reference to nsstring; r=mystor
MozReview-Commit-ID: 4iVvbKi0LlL

--HG--
extra : histedit_source : bc561b24e4b5bfdf1100680f59d3d046ec434cb5
2017-10-24 10:52:55 -07:00
Nika Layzell 1b1ba4879a Bug 1403213 - Move nsstring into servo/support/gecko/nsstring, r=froydnj
MozReview-Commit-ID: 8ucStGkxmj7

--HG--
rename : xpcom/rust/nsstring/gtest/Test.cpp => xpcom/rust/gtest/nsstring/Test.cpp
rename : xpcom/rust/nsstring/gtest/test.rs => xpcom/rust/gtest/nsstring/test.rs
extra : rebase_source : 509a2ab1aa569e8f3ef0955dcdfa36b53ce5e234
2017-10-23 15:37:25 -04:00
Sebastian Hengst af53b8aad8 merge mozilla-central to autoland. r=merge a=merge 2017-10-23 23:52:54 +02:00
Sebastian Hengst 364d36fab2 merge mozilla-inbound. r=merge a=merge
MozReview-Commit-ID: B09kHrHK42C
2017-10-23 23:50:37 +02:00
Jeff Hemphill e74e880a6c Bug 1403802: Port nsHttpHandler::PrepareAcceptLanguages over to Rust; r=valentin,froydnj 2017-10-22 11:27:59 -07:00
Sylvestre Ledru 0b4c0acb99 Bug 1410617 - Fix a tiny typo r=andi
MozReview-Commit-ID: CGgerr8S8aR

--HG--
extra : rebase_source : 98a36e18a0bde8fdfa867767cff9e5c1fd6a87d9
2017-10-21 14:07:49 +02:00
Sylvestre Ledru 57797d9b17 Bug 1410617 - compare uint64_t with size_t only on 32bit platforms. r=valentin
MozReview-Commit-ID: GR4lQhyDUJe

--HG--
extra : rebase_source : 66246fe57df38e99402efe5a7cbc9a40150524af
2017-10-21 14:07:08 +02:00
Sebastian Hengst 5d671ee296 Backed out changeset 74c58b336d30 (bug 1403213) for referencing non-existing xpcom/rust/gtest/moz.build in xpcom/moz.build. r=backout on a CLOSED TREE
--HG--
extra : amend_source : 7c25d872785312b81c4a94ef32de025b38642f54
2017-10-20 21:30:36 +02:00
Nika Layzell a4927e2417 Bug 1403213 - Move nsstring into servo/support/gecko/nsstring, r=froydnj
MozReview-Commit-ID: FmKtJxSCdYc
2017-10-20 12:04:30 -07: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
Valentin Gosu dfab8e64b8 Bug 1403522 - 'No Proxy For' does not work right if it contains '<local>' only r=bagder
MozReview-Commit-ID: KRW15BxzcN3

--HG--
extra : rebase_source : 47a1b7860c83bc482c7b1e5d4a92401339f19ac5
2017-10-18 16:00:04 +02:00
Andi-Bogdan Postelnicu c9decadfc3 Bug 1410379 - compare uint64_t with size_t only on 32bit platforms. r=valentin
MozReview-Commit-ID: 1exUwUwaY3B

--HG--
extra : rebase_source : 83f199c92e641baa5c44fd65095a87af0528863e
2017-10-20 15:46:28 +03: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
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
Andrea Marchesini ec610d5b7e Bug 1409329 - NS_NewBufferedOutputStream should take the ownership of the outputStream, r=smaug 2017-10-24 14:38:23 +02:00
Andrea Marchesini 6626e900f9 Bug 1409327 - NS_NewBufferedInputStream should take the ownership of the inputStream, r=smaug 2017-10-19 11:39:30 +02:00
Nicholas Nethercote 78030c0e7b Bug 1409598 - Change nsIXPCScriptable::className and nsIClassInfo::{contractID,classDescription} from string to AUTF8String. r=froydnj.
This lets us replace moz_xstrdup() of string literals with AssignLiteral(),
among other improvements.

--HG--
extra : rebase_source : 9994d8ccb4f196cf63564b0dac2ae6c4370defb4
2017-10-18 13:17:26 +11:00
Nicholas Hurley 27e579b139 Bug 1409210 - Don't prefetch resources with a Vary header. r=valentin
Conceivably, we could allow a few more prefetches than this would (based
on the headers in the original request matching up to a header listed in
the Vary response header), but this is safer in case (for example)
future requests of this resource end up sending a cookie that wasn't set
on the original request. In practice, the difference is likely to be
small enough that this broader stroke won't make a huge impact on the
number of things we do or don't prefetch.

MozReview-Commit-ID: GhD9mZR6aOX

--HG--
extra : rebase_source : 13a2edb99485c73db902d2ec8b0f2b5b1d437abe
2017-10-16 16:55:46 -07:00
Sebastian Hengst f9b5b9b40c merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 790IXj5MZ4f
2017-10-18 11:48:34 +02:00
Ben Kelly fe79c4da06 Bug 1204254 P12 Remove nsIInterceptedChannel.responseBody and backing nsPipe code. r=asuth 2017-10-17 13:38:55 -07:00
Ben Kelly 827e1b543b Bug 1204254 P7 Allow the body nsIInputStream to be passed in StartSynthesizeResponse(). r=asuth 2017-10-17 13:38:55 -07:00
Ben Kelly 262c2cb4f2 Bug 1204254 P2 Move StartSynthesizedResponse() out from FinishSynthesizedResponse(). r=asuth 2017-10-17 13:38:54 -07:00
Ben Kelly 89cd4507cf Bug 1204254 P1 Add an nsIInterceptedChannel::StartSynthesizedResponse() method. r=asuth 2017-10-17 13:38:54 -07:00
Sebastian Hengst b1cdb2af00 Backed out changeset 03e4f9175b16 (bug 1409329) 2017-10-17 22:03:39 +02:00
Sebastian Hengst 66e04dcde6 Backed out changeset 4666cde20909 (bug 1409327) 2017-10-17 22:03:33 +02:00