Commit Graph

16032 Commits

Author SHA1 Message Date
Bobby Holley
2b985ab718 Bug 1451421 - Add a ToLowerCaseASCII utility method for nsAtom. r=hisvonen 2018-04-06 15:30:15 -07: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
Julian Descottes
c87c82b440 Bug 1452187 - fix localization note mismatch;r=flod
Cleanup of all localization notes that refer to entities
that are not listed in the corresponding localization file.

MozReview-Commit-ID: Bl0VU9HoPfa

--HG--
extra : rebase_source : 86680b8ae037783304f045e94c7af7053a0f69e9
2018-04-06 20:21:35 +02:00
arthur.iakab
a63676a8df Merge mozilla-central to autoland 2018-04-06 01:14:00 +03:00
Marco Castelluccio
dbeabc37e3 Bug 1423667 - Reenable some tests that were disabled because of a Clang update. r=jmaher
--HG--
extra : rebase_source : 1ace11df58e858905e9d53c32d9cf8e1f75046d4
2018-04-05 09:20:47 +01:00
Daniel Stenberg
7ca074617e bug 1451750 - treat rrsets from different resolvers as different r=mcmanus
... even if all the addresses are identical.

Otherwise the IsTRR() bit would be dropped, resulting in
about:networking showing false for this entry while in reality being
TRR. Or vice versa.

MozReview-Commit-ID: JABLm09iCnn

--HG--
extra : rebase_source : 24f9ff8b6818c00359069add23d1354ab2f1b1f9
2018-04-05 16:30:10 +02: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
Valentin Gosu
44b773489f Bug 1450726 - Missing null check for mLoadInfo r=jkt
MozReview-Commit-ID: Cz7qj1qulK1

--HG--
extra : rebase_source : 79fc4e37ea6b9fc280dcaf11c2b9661a1493c04c
2018-04-02 20:18:53 +03:00
Daniel Stenberg
695dbf5db9 bug 1451150 - make TRRService wait for the correct CP event r=valentin
MozReview-Commit-ID: LwBjw7EKBhR

--HG--
extra : rebase_source : 404f132e48b1c57a3b93cc1efcd64a16a425f32b
2018-04-04 00:16:55 +02:00
Ben Kelly
0145a9634a Bug 1450874 P2 Don't save service worker time stamps if the fetch event didn't actually dispatch. r=asuth 2018-04-03 19:53:21 -07:00
Ciure Andrei
7208a2fee8 Merge inbound to mozilla-central. a=merge 2018-04-04 00:54:16 +03:00
Dave Townsend
e2dffad4ac Bug 1448500: Add speculative request content policy type. r=bz, r=kmag
Adds a new TYPE_SPECULATIVE to nsIContentPolicy uses it as the type for
speculative connection channels from the IO service. I believe I've added it to
all the content policies in tree to make sure it behaves the same as TYPE_OTHER
used to.

The webextension test shows that the webextension proxy API sees speculative
lookups requested through the IO service.

MozReview-Commit-ID: DQ4Kq0xdUOD

--HG--
extra : rebase_source : d9460fdac118bc68f0db79749a16f181b580f2e7
2018-03-23 15:27:08 -07:00
Daniel Stenberg
a204c8eb02 bug 1450583 - require macOS 10.13.4 (uname 17.5.0) for enabling TFO r=mcmanus
MozReview-Commit-ID: LbfgT9oS9O

--HG--
extra : rebase_source : 6099048103e227d25550a2ed2358cf1b3118042a
2018-04-03 14:49:39 +02:00
Daniel Stenberg
e443c66c37 bug 1447642 - no more DNSService restarts r=valentin
The DNS service was shutdown and restarted again in several scenarios,
for example when one of its prefs changed and by nsIOService when going
offline/online. The DNSService restart dragged the resolver, TRRService
and others with it and they too were thus restarted.

Most notably this hurt TRR resolving, as the restart caused short gaps
in time when there was no TRRService available and nsHostResolver
defaults to TRR Mode "native" if there's no TRRservice up, causing the
name resolver to occasionally use the wrong or unexpected resolver even
though TRR is enabled.

The resolver restart also flushed the DNS cache which is now avoided.

It is also a performance gain.

MozReview-Commit-ID: pp4Y8bNQJk

--HG--
extra : rebase_source : 9e3b3e6c0df16b8ca6287d8045f594026ae9ad6d
2018-03-21 14:35:53 +01:00
Andrew McCreight
e80864c94c Bug 1438688, part 3 - Remove XPT files from the packaging process. r=glandium
Now that XPT files are not loaded from files at runtime, code for
packaging XPT files can be removed.

This means that a couple of test XPIDL interfaces will get shipped in
builds to users that weren't before, but I don't think that matters
much.

This also puts XPT files into the local objdir for the XPIDL makefile,
instead of dist/bin, because they are no longer part of the
distribution.

MozReview-Commit-ID: 7gWj8KWUun3

--HG--
extra : rebase_source : 65bac47c2cd1a20b3c675a01b44a25a1d2d3ab7a
2018-03-05 14:27:29 -08:00
Dorel Luca
f24505d99e Backed out 7 changesets (bug 1438688) for android xpcshell failures on builds/worker/workspace/build/tests/bin/components/test_necko.xpt
Backed out changeset 8786eabb61a4 (bug 1438688)
Backed out changeset e05ec1e08b46 (bug 1438688)
Backed out changeset 4c437ba9d984 (bug 1438688)
Backed out changeset 2f243bca1af3 (bug 1438688)
Backed out changeset 4da0e1839353 (bug 1438688)
Backed out changeset 186f916dcc7a (bug 1438688)
Backed out changeset 08b1a5f904e4 (bug 1438688)
2018-04-03 02:30:53 +03:00
Andrew McCreight
fc09560f06 Bug 1438688, part 3 - Remove XPT files from the packaging process. r=glandium
Now that XPT files are not loaded from files at runtime, code for
packaging XPT files can be removed.

This means that a couple of test XPIDL interfaces will get shipped in
builds to users that weren't before, but I don't think that matters
much.

This also puts XPT files into the local objdir for the XPIDL makefile,
instead of dist/bin, because they are no longer part of the
distribution.

MozReview-Commit-ID: 7gWj8KWUun3

--HG--
extra : rebase_source : 6f7d4fd1d6cdea2c14866705a2dc972eb5f43382
2018-03-05 14:27:29 -08:00
Dorel Luca
a7d5a65268 Merge mozilla-inbound to mozilla-central. a=merge 2018-04-03 01:00:11 +03:00
Michal Novotny
e4fe2d6393 Bug 1436809 - Check that stream message was converted to string correctly. r=valentin
--HG--
extra : amend_source : a4dbdaa91a4af641b0a538aa208c19a122d30ae4
2018-04-02 12:59:18 -04:00
Honza Bambas
951c3c0c9e Bug 1441726 - Include CacheStorageService::mPurgeTimeStamps hashtable in the memory reporter. r=michal 2018-03-27 10:21:00 +03:00
Henri Sivonen
eb75469c5b Bug 1448755 - Use AssignLiteral and AssignASCII for short zero-terminated strings in networking. r=jduell.
MozReview-Commit-ID: HPzng5p6qkb

--HG--
extra : rebase_source : 20cec6b448c3152dddac5ac93d678745958a993a
2018-03-26 09:02:32 +03: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
Christoph Kerschbaumer
3739c23b85 Bug 1439713 - Add flag to loadinfo for skipping certain security policy checks. r=bz 2018-03-29 11:14:35 +02:00
Christoph Kerschbaumer
a929955d1f Bug 1439713 - Change nsIContentPolicy shouldLoad to take an <uri, loadInfo> pair instead of the various args. r=bz 2018-03-29 12:16:23 +02:00
Tom Ritter
449237fc51 Bug 1378552 - Reduce the liklihood of inadvertently misusing NullPrincipal::Create(). r=ckerschb
NullPrincipal::Create() (will null OA) may cause an OriginAttributes bypass.
We change Create() so OriginAttributes is no longer optional, and rename
Create() with no arguments to make it more explicit about what the caller is doing.

MozReview-Commit-ID: 7DQGlgh1tgJ
2018-03-22 13:36:20 -05:00
Honza Bambas
d6561f3cd0 Bug 1433088 - Make the HTTP cache entry age based validation calculation work with the internal one-second only round-down resolution to make max-age=0 force immediate expiration. r=michal 2018-03-28 08:35:00 -04:00
Nicholas Nethercote
fd81947ea1 Bug 1448220 - Convert all network predictor VarCache prefs to the new StaticPrefList form. r=hurley
MozReview-Commit-ID: JiPbv84btDc

--HG--
extra : rebase_source : 46fb2b41d4233341166ced3a67100a086a7ffad7
2018-03-16 13:26:04 +11:00
Honza Bambas
d0b352582e Bug 1442784 - Carry isMainDocumentChannel HTTP channel flag to redirected HTTP channels, r=michal
--HG--
extra : rebase_source : fc3fa8510359725c8c7165f973f1aae7a1cc5def
2018-03-26 10:49:00 +03:00
Nathan Froyd
55e0321931 Bug 1448021 - make TicklerTimer's constructor explicit; r=valentin
Attempting to stand up the static analysis for Android builds revealed
that we weren't being explicit enough.
2018-03-27 10:51:32 -04:00
Franziskus Kiefer
806baa5430 Bug 1415279 - Move error strings for certError and netError pages to frontend, r=johannh,keeler,Honza,snorp
This patch moves all TLS error string handling to the frontend.
Dev-tools doesn't show the same error code as the page does anymore but only the error code as string.
All logging of these error messages has been removed.

Bug #: 1415279

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

--HG--
extra : rebase_source : 61e2d94cb21ef4c02b81448531609205c85a9707
2018-03-27 13:31:52 +02:00
Bogdan Tara
39d9b048b9 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-03-27 12:16:26 +03:00
Bogdan Tara
302a55b534 Merge inbound to mozilla-central. a=merge 2018-03-27 12:12:57 +03:00
Nicholas Nethercote
136f284c7d Bug 1436655 - Introduce a mechanism for VarCache prefs to be defined entirely in the binary. r=glandium
Currently VarCache prefs are setup in two parts:

- The vanilla pref part, installed via a data file such as all.js, or via an
  API call.

- The VarCache variable part, setup by an Add*VarCache() call.

Both parts are needed for the pref to actually operate as a proper VarCache
pref. (There are various prefs for which we do one but not the other unless a
certain condition is met.)

This patch introduces a new way of doing things. There is a new file,
modules/libpref/init/StaticPrefList.h, which defines prefs like this:

> VARCACHE_PREF(
>   "layout.accessiblecaret.width",
>   layout_accessiblecaret_width,
>   float, 34.0
> )

This replaces both the existing parts.

The preprocessor is used to generate multiple things from this single
definition:

- A global variable (the VarCache itself).

- A getter for that global variable.

- A call to an init function that unconditionally installs the pref in the
  prefs hash table at startup.

C++ files can include the new StaticPrefs.h file to access the getter.

Rust code cannot use the getter, but can access the global variable directly
via structs.rs. This is similar to how things currently work for Rust code.

Non-VarCache prefs can also be declared in StaticPrefList.h, using PREF instead
of the VARCACHE_PREF.

The new approach has the following advantages.

+ It eliminates the duplication (in all.js and the Add*VarCache() call) of the
  pref name and default value, preventing potential mismatches. (This is a real
  problem in practice!)

+ There is now a single initialization point for these VarCache prefs.
  + This avoids need to find a place to insert the Add*VarCache() calls, which
    are currently spread all over the place.
  + It also eliminates the common pattern whereby these calls are wrapped in a
    execute-once block protected by a static boolean (see bug 1346224).
  + It's no longer possible to have a VarCache pref for which only one of the
    pieces has been setup.

+ It encapsulates the VarCache global variable, so there is no need to declare
  it separately.

+ VarCache reads are done via a getter (e.g. StaticPrefs::foo_bar_baz())
  instead of a raw global variable read.
  + This makes it clearer that you're reading a pref value, and easier to
    search for uses.
  + This prevents accidental writes to the global variable.
  + This prevents accidental mistyping of the pref name.
  + This provides a single chokepoint in the code for such accesses, which make
    adding checking and instrumentation feasible.

+ It subsumes MediaPrefs, and will allow that class to be removed. (gfxPrefs is
  a harder lift, unfortunately.)

+ Once all VarCache prefs are migrated to the new approach, the VarCache
  mechanism will be better encapsulated, with fewer details publicly visible.

+ (Future work) This will allow the pref names to be stored statically, saving
  memory in every process.

The main downside of the new approach is that all of these prefs are in a
single header that is included in quite a few places, so any changes to this
header will cause a fair amount of recompilation.

Another minor downside is that all VarCache prefs are defined and visible from
start-up. For test-only prefs like network.predictor.doing-tests, having them
show in about:config isn't particularly useful.

The patch also moves three network VarCache prefs to the new mechanism as a
basic demonstration. (And note the inconsistencies in the multiple initial
values that were provided for
network.auth.subresource-img-cross-origin-http-auth-allow!) There will be
numerous follow-up bugs to convert the remaining VarCache prefs.

MozReview-Commit-ID: 9ABNpOR16uW
* * *
[mq]: fixup

MozReview-Commit-ID: 6ToT9dQjIAq
2018-03-26 09:39:40 +11:00
Henri Sivonen
eaa2f6b46b Bug 1395114 - Remove nsIUnicharStreamLoader. r=emilio,michal
MozReview-Commit-ID: ECKNnJt80oK

--HG--
extra : rebase_source : 6f09937e0648c65d035dfb4935d6e9a06d0223df
2018-03-26 12:45:31 +03:00
Florian Quèze
02569d8da2 Bug 1448033 - Update the progress of downloading an update every 100ms, r=mcmanus. 2018-03-23 19:41:52 +01:00
Noemi Erli
1270a21724 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-03-23 01:00:18 +02:00
Valentin Gosu
105a3dd952 Bug 1447194 - Use threadsafe refcounting in all nsIURI implementations r=mayhemer
It seem that only nsStandardURL and nsSimpleURI (and classes that inherit them) do not have threadsafe refcounting yet.

MozReview-Commit-ID: J8gLoBSPCTl

--HG--
extra : rebase_source : 0e1659c28b18909e31b2e3e74baf74edf1e100c8
2018-03-20 15:51:17 +01:00
Valentin Gosu
83e7f0c0ea Bug 1447190 - Remove internal mutability from nsStandardURL r=mayhemer
* Removes mSpecEncoding since the spec is always ASCII encoded
* nsStandardURL::InitGlobalObjects is now called from nsNetStartup
* Removes prefObserver from nsStandardURL
* mDisplayHost is now initialized every time that we change the hostname
* Adds locking to the gAllURLs list

MozReview-Commit-ID: 93mwECxYxWl
* * *
[mq]: overfix

MozReview-Commit-ID: 98nyTYa5ZeR

--HG--
extra : rebase_source : 82045e10771038d7168d1f235143c24c72dd5a45
2018-03-22 02:59:32 +01:00
Boris Zbarsky
d989f864ea Bug 1444143 part 14. Rename nsIFrameLoader.idl to nsIFrameLoaderOwner.idl. r=mystor
MozReview-Commit-ID: 1XpEjoFLSQh

--HG--
rename : dom/base/nsIFrameLoader.idl => dom/base/nsIFrameLoaderOwner.idl
2018-03-21 22:43:17 -04:00
Boris Zbarsky
9cb6df0dac Bug 1444143 part 2. Remove nsIFrameLoader::GetDocShell. r=mystor
The change from "docShell" to "mDocShell" for the SetName call in the
OwnerIsMozBrowserFrame case in nsFrameLoader::MaybeCreateDocShell is a
drive-by correctness fix for a bug the rename of "docShell" to "parentDocShell"
caught: setting the name of our _parent_ docshell based on the name attr of our
owner makes no sense.

MozReview-Commit-ID: DwnWt8jTokV
2018-03-21 22:43:15 -04:00
arthur.iakab
161c0e01f4 Merge mozilla-central to mozilla-inbound 2018-03-22 02:02:06 +02:00
Valentin Gosu
ed088d0c3e Bug 1416791 - Eliminate mutability from nsHostObjectURI by removing nsIURIWithBlobImpl r=baku
* blobImpl references are now only kept in nsHostObjectProtocolHandler
* removes nsHostObjectProtocolHandler.idl
* Makes nsHostObjectURI no longer inherit from nsSupportsWeakReference

MozReview-Commit-ID: AC1klrfsMnn

--HG--
extra : rebase_source : 142802f9a6fa6aae5611dccf117d88f96a9985a6
2018-03-21 15:33:15 +01:00
Honza Bambas
ee49bea9fc Bug 1447566 - Remove all remaning MOZ_ASSERT(!mSynTimer) checks from nsHalfOpenSocket, since we no longer enforce it null under certain conditions. r=valentin 2018-03-21 08:28:00 -04:00
Miko Mynttinen
65c6bee9d6 Bug 1445302 - Replace TArray.RemoveElementAt(TArray.Length() - 1) pattern with TArray.RemoveLastElement() or TArray.PopLastElement() r=froydnj
MozReview-Commit-ID: rGjabnP2iz

--HG--
extra : rebase_source : 1ef6c5ce028ac9ebd9f3176d57835c43fe46bada
2018-03-13 14:51:33 +01:00
Tiberius Oros
649398dfd9 Merge inbound to mozilla-central. a=merge 2018-03-21 12:03:08 +02:00
Kris Maglione
98aba60038 Bug 1446571: Follow-up: Fix another test that expected raw numeric errors. r=bustage DONTBUILD
MozReview-Commit-ID: 7e3THFQd2CZ
2018-03-20 21:00:28 -07:00
Kris Maglione
140cc17b5d Bug 1446571: Follow-up: Fix test that expected raw numeric errors. r=bustage
MozReview-Commit-ID: 1Y7kPAvApPo
2018-03-20 20:13:17 -07:00
Kris Maglione
96e4667ef9 Bug 1446571: Part 2a - Stop throwing raw numeric values in https.js. r=aswan
This isn't strictly related, but I ran into it for the nth time while updating
tests, and I got fed up with having my tests fail with a useless numeric value
with no indication of where it came from.

MozReview-Commit-ID: 6OjgVYw7tNd

--HG--
extra : rebase_source : 259667d2a26ec4252a0f8a097ca35b3b702b17a0
extra : histedit_source : 492f541471b896a9a4b941baad2b14de8faf9113
2018-03-16 17:48:13 -07:00