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

16014 Коммитов

Автор SHA1 Сообщение Дата
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
Valentin Gosu eccc344c51 Bug 1442242 - Make the constuctors of URI implementations private r=mayhemer
MozReview-Commit-ID: LonNnZyJjVO

--HG--
extra : rebase_source : ceefc81a669b17f68f193fce5f172f9f2268a998
2018-03-20 23:23:31 +01:00
Valentin Gosu d4bfa7921c Bug 1442242 - Add nsIURIMutator method to mark when the URI implementation should support nsIFileURL r=mayhemer
* This is needed in order to make the constructors of URI implementations private

MozReview-Commit-ID: 8dddDXbmrfF

--HG--
extra : rebase_source : b8e471d228617ae4bd07c5ed6317951c06ce8d56
2018-03-20 12:52:43 +01:00
Thom Chiovoloni a76a5bce76 Bug 1447086 - Return a promise from stop() in httpd.js r=ted.mielczarek
MozReview-Commit-ID: 7pxiQazBMqg

--HG--
extra : rebase_source : 5e2fab84ba91e987d101784296d3ec09ec439df7
2018-03-19 11:40:18 -07:00
Nils Ohlmeier [:drno] 6d558b16f6 Bug 1443032: stop closing usrsctp on callback. r=jesup
MozReview-Commit-ID: BgX9I1shVeN

--HG--
extra : rebase_source : ffee150924da89bd7e7564730c9c08fa59653223
2018-03-20 11:19:14 +00:00
Cosmin Sabou 66b7c55e79 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-03-21 00:51:18 +02:00
Valentin Gosu ba3f9989ec Bug 1426353 - Do not allow the parent process to consume alt-data generated in the content process. r=michal
MozReview-Commit-ID: htQ28muaBI

--HG--
rename : netwerk/test/unit/test_alt-data_simple.js => netwerk/test/unit/test_alt-data_cross_process.js
rename : netwerk/test/unit_ipc/test_alt-data_simple_wrap.js => netwerk/test/unit_ipc/test_alt-data_cross_process_wrap.js
2018-03-06 02:44:51 +01:00
Valentin Gosu 87857475e6 Bug 1433609 - Ensure that deserialized URL is correct r=mayhemer
MozReview-Commit-ID: BMQfPzPhDhc
2018-02-14 14:40:05 +01:00
Kris Maglione c09b0c1a99 Bug 1446833: Part 2 - Stop using Task.jsm in xpcshell/head.js. r=florian
MozReview-Commit-ID: 6vSpwih9Fnr

--HG--
extra : rebase_source : 9ca452486f144a35514f00742722b6a59efadacd
extra : histedit_source : af6cc6fef47116a4c98113fcd4fd157217a75106
2018-03-18 15:27:04 -07:00
Andrea Marchesini 41b639fbc7 Bug 1448795 - nsMIMEInputStream must call OnInputStreamReady() with the correct nsIAsyncInputStream, r=asuth 2018-03-26 19:06:31 +02:00
vinoth 24cafeec62 Bug 1416045. r=mayhemer CLOSED TREE
Reviewers: mayhemer

Reviewed By: mayhemer

Subscribers: freddyb, dveditz, mayhemer, ckerschb, vinoth

Tags: PHID-PROJ-wkydohdk6pajyfn2llkb

Bug #: 1416045

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

--HG--
extra : rebase_source : 65fb235d787b6955da1433ea2ffd56082cab0b30
extra : amend_source : affac492394597daf9b3294d4aca2f61bc27fc73
2018-03-22 21:02:16 +02:00
Andreea Pavel d9d9517a78 Merge mozilla-central to autoland. a=merge on a CLOSED TREE 2018-03-20 00:42:18 +02:00
David Keeler aa1464d4a7 bug 1444265 - break a potential cycle in BackgroundFileSaver to prevent leaks r=jduell
BackgroundFileSaver holds a reference to its nsIBackgroundFileSaverObserver
(observer). If such an observer has an enclosure that captures the
BackgroundFileSaver itself (as in test_backgroundfilesaver.js), this causes a
cycle that won't be caught by the cycle collector. Thus, we have to manually
break the cycle when we're done with the observer (in
BackgroundFileSaver::NotifySaveComplete). Note that this currently relies on the
fact that this implementation requires that Finish always be called (see remarks
in nsIBackgroundFileSaver.idl).

MozReview-Commit-ID: GOO9q2vFRso

--HG--
extra : rebase_source : f62b0ec513e0b681da3e76c0af31077d2fa03fea
extra : amend_source : 2b3a11d4b17df10705bad38e02b6ce130b456448
2018-03-14 15:02:49 -07:00
Honza Bambas e5943f18e9 Bug 1445796 - Add logging of a calling JS script to more http channel methods. r=valentin 2018-03-16 09:28:00 -04:00
Richard Pospesel 2ba1e92974 Bug 1441327 - Allow for seccomp filtering of socket(AF_INET/AF_INET_6) calls on Linux when using UNIX Domain Sockets for SOCKS Proxy. r=bagder
The initialization path for the SOCKS proxy in firefox involves creating
a generic AF_INET socket, and then replacing it if the actual
configuration requires something else (either AF_INET6 or AF_LOCAL).
With syscall filtering configured to return an error in the event of
AF_INET or AF_INET6 socket creation, this initialization path fails.  We
would like this capability so that we can prevent firefox from making
network requests outside of the Tor proxy.

This patch adds a check in the initial socket creation path to see if
the SOCKS proxy host begins with file:// with the assumption that such
URIs point to a UNIX Domain Socket (on Linux+macOS only).  In that case,
we create an AF_LOCAL socket rather than the requested type.  A similar
check for Windows already exists to determine if the proxy is actually a
named pipe.

In the subsequent replacing step no work occurs as the passed in socket
matches the type we need, so no changes need to be made there.

NOTE: With this change there is still a one-time request for an AF_INET6
socket that occurs.  This code path exists to determine whether the
system supports IPv6; if socket(AF_INET6...) fails then it is assumed
that the system does not.  However, this check only affects code that is
unreachable when using AF_LOCAL sockets so it seems safe leave as it is.
However, this does mean that firefox will still be incompatible with
seccomp policies which kill the calling thread in the event of a
socket(AF_INET6,...) call.
2018-03-07 12:58:00 -05:00