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

15079 Коммитов

Автор SHA1 Сообщение Дата
Sebastian Hengst de6f7dc3a1 merge mozilla-central to mozilla-inbound. r=merge a=merge on a CLOSED TREE 2017-08-25 13:21:40 +02:00
Jan de Mooij a5de55dced Bug 1389510 part 3 - Remove getProperty/setProperty hooks from ClassOps. r=evilpie 2017-08-25 10:12:16 +02:00
Nicholas Hurley 4eb476eee2 Bug 1390274 - only parse URIs in the predictor when absolutely necessary. r=valentin
This moves URI creation from ParseMetaDataEntry into SetupPrediction
because ParseMetaDataEntry is called in way more circumstances than we
actually need the URI from. Even in those cases where we might use the
URI (but it's not guaranteed), we end up using the URI less often than
we create one. In case it wasn't clear, SetupPrediction is the only
thing called post-ParseMetaDataEntry that would require a parsed URI in
the first place.

SetupPrediction has the duplicated NS_NewURI calls to avoid creating
URIs for those calls to SetupPrediction that are no-ops.

MozReview-Commit-ID: HlhVj7p2uuk

--HG--
extra : rebase_source : 0349dc52225b6e93150947ea978f2ba7afa3e2f5
2017-08-22 07:43:41 -07:00
Sebastian Hengst aeacc34883 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 6TGQRm8SSk0
2017-08-24 13:28:57 +02:00
Michal Novotny 8030ac3f2d Bug 1382688 - Do not allow to enable old disk cache backend, r=honzab 2017-08-24 10:25:38 +02:00
Wes Kocher bd5fb0a92d Merge m-c to autoland, a=merge
MozReview-Commit-ID: AHOFLdPkEou
2017-08-23 18:08:30 -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
Nicholas Nethercote 9160e1cba8 Bug 1390428 (part 6) - Remove nsXPIDLCString class members. r=erahm.
These are all straightforward except for InternalLoadEvent::mTypeHint, which
requires a bit of care to preserve existing behaviour.

--HG--
extra : rebase_source : 9b152122b011cf49b9acccdc98b4693548b8bdd2
2017-08-17 14:17:27 +10:00
Eric Rahm a33f11e0f5 Bug 1391803 - Use nsStringFwd.h for forward declaring string classes. r=froydnj
We should not be declaring forward declarations for nsString classes directly,
instead we should use nsStringFwd.h. This will make changing the underlying
types easier.

--HG--
extra : rebase_source : b2c7554e8632f078167ff2f609392e63a136c299
2017-08-16 16:48:52 -07:00
Andrew Sutherland 34b0ef6798 Bug 1383518 - Part 2: nsMIMEInputStream should conditionally implement nsIAsyncInputStream. r=bkelly
NS_AsyncCopy aborts if it receives an NS_BASE_STREAM_WOULD_BLOCK error result
during copying and it is unable to QI the source stream to an
nsIAsyncInputStream.  IPCBlobInputStream can return this, especially if it's:
- A freshly created aggregate stream as part of form submission of a type=file
  where the Blob will come from the parent because of the file picker but the
  stream is being uploaded from the child.
- A ServiceWorker is involved, causing
  HttpBaseChannel::EnsureUploadStreamIsCloneable to trigger an NS_AsyncCopy
  very early in the process.

IPCBlobInputStream implements nsIAsyncInputStream, and nsMultiplexInputStream
does too (conditionally based on its child streams; if any are async, it takes
step to uniformly expose async behavior).  However, due to lack of sufficient
test coverage, nsMIMEInputStream did not get fixed as part of bug 1361443 when
nsMultiplexInputStream gained its nsIAsyncInputStream powers.  We address that
here in the same fashion.

Part 1 of this series addresses the test coverage issue.

--HG--
extra : rebase_source : 1cae03a314397b159c3985d97231c1e34cd5f079
2017-08-23 06:39:36 -04:00
Sebastian Hengst 99e5cb9c14 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: GSKVB94r7Kk
2017-08-23 16:29:51 +02:00
Tom Tung 3eb6957b71 Bug 1328398 - Add telemetry to measure service worker launch time. r=bkelly,francois datareview=francois
This patch is mainly to add a probe to measure sw launch time. To do this, this
patch records the sw launch time when the sw is just spwaned and it's ready to
handle the incoming fetch event.

MozReview-Commit-ID: 3w5MNyhQNnd

--HG--
extra : rebase_source : 3228213d0ea6be1d23b9c49382f1f8d3c2f358f1
2017-08-17 18:32:36 +08:00
Honza Bambas 135f2e4a1c Bug 1392264 - Return undispatched HTTP transaction to the queue in the same order as they were before. r=kershaw 2017-08-21 07:02:00 -04:00
Honza Bambas 51907c6b32 Bug 1388448 - Logs for better network requests and context tracking. r=mcmanus 2017-08-17 12:16:00 -04: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
Haik Aftandilian 3ed52c079e Bug 1390346 - Redirects to moz-extension:-URLs fail when loaded from a xpi. r=jimm
MozReview-Commit-ID: 2FzUWLTiLs

--HG--
extra : rebase_source : a8893d082a4dd102b59b448ff65b4fb875edb334
2017-08-18 11:30:21 -07:00
Nicholas Nethercote 780a2e4aec Bug 1390428 (part 4) - Remove still more nsXPIDLCString local variables. r=erahm.
These are all easy cases where an nsXPIDLCString local variable is set via
getter_Copies() and then is null checked. The patch uses IsVoid() to replace
the null checks (and get() and EqualsLiteral() calls to replace any implicit
conversions).

--HG--
extra : rebase_source : 484ad42a7816b34b86afbe072e04ba131c1619c6
2017-08-16 13:58:55 +10:00
Nicholas Nethercote bc3ca2ebdd Bug 1390428 (part 3) - Remove nsXPIDLCString use in nsHttpHandler. r=erahm.
Most of these fields are not using any nsXPIDLCString-specific features.
The exceptions are mUserAgentOverride and mDefaultSocketType, which require a
little more care.

--HG--
extra : rebase_source : 50d2178b7bf10f6076fe27f2e65a4b63f1153590
2017-08-16 13:58:55 +10:00
Valentin Gosu 396c957233 Bug 1306646 - Match updated Timing-Allow-Origin definition for resource timing r=nwgh
MozReview-Commit-ID: GQDhISc9WRD
2017-08-22 22:33:03 +02:00
Sebastian Hengst 75955d0246 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 8fJX1xXgzhD
2017-08-22 11:49:04 +02:00
Nicholas Nethercote 8a72cf2251 Bug 1390428 (part 2, attempt 2) - Remove more nsXPIDLCString local variables. r=erahm.
--HG--
extra : rebase_source : 69d58b0cfb56efc6b03d8e2d7be2ce3c3e6cd843
2017-08-21 20:01:27 +10:00
Christoph Kerschbaumer 9b81c8b695 Bug 1391011: CSP: Fix upgrade-insecure-requests for toplevel navigations when base it https. r=smaug 2017-08-21 08:57:14 +02:00
Nicholas Nethercote 4a623e6df4 Bug 1385172 - Replace nsEscapeHTML{,2}() with new nsAppendEscapedHTML() function. r=erahm.
The existing functions work with C strings but almost all the call sites use
Mozilla strings.

The replacement function has the following properties.

- It works with Mozilla strings, which makes it much simpler and also improves
  the call sites.

- It appends to the destination string because that's what a lot of the call
  sites need. For those that don't, we can just append to an empty string.

- It is declared outside the |extern "C"| section because there is no need for
  it to be in that section.

Note: there is no 16-bit variant of nsAppendEscapedHTML(). This is because
there are only two places that need 16-bit variants, both rarely executed,
and so converting to and from 8-bit is good enough.

The patch also adds some testing of the new function, renaming
TestEscapeURL.cpp as TestEscape.cpp in the process, because that file is now
testing other kinds of escaping.

--HG--
rename : xpcom/tests/gtest/TestEscapeURL.cpp => xpcom/tests/gtest/TestEscape.cpp
extra : rebase_source : 51145ae2c9b0b4573c7ea0c342dcb246f9f14fb9
2017-08-18 12:00:59 +10:00
Dragana Damjanovic b274c67092 Bug 1390881 - Improve the TFO telemetry. r=mcmanus 2017-08-20 09:45:26 +02:00
Dragana Damjanovic 279495a829 Bug 1390881 - Check whether TFO cookie or TFO cookie and data are sent on Windows. r=mcmanus 2017-08-20 09:45:17 +02:00
Wes Kocher 91f1f19054 Merge m-c to autoland, a=merge
MozReview-Commit-ID: IMdYxijQ9ie
2017-08-21 17:20:06 -07:00
Nicholas Hurley d4f64ba24e Bug 1391467 - Remove --enable-necko-protocols. r=gps,valentin
This patch removes the ability to select which protocols you want
included in necko, a wholly untested configuration that is broken in
practice. We have no need of this kind of configurability in necko.

In addition, this removes the final vestiges of rtsp support, which was
originally removed in bug 1295885 but still had some stuff hanging
around behind some ifdefs (that were never true).

MozReview-Commit-ID: KOEaDmit2IL

--HG--
extra : rebase_source : f6c2fdb972aaba46e922cda801252dc953550b94
2017-08-17 17:30:57 -07:00
Phil Ringnalda 9359f5bf39 Merge inbound to m-c, a=merge
MozReview-Commit-ID: LCCoXUsCtmv
2017-08-19 15:29:10 -07:00
Chris Peterson 1447808ce8 Bug 1389851 - netwerk: Fix -Wunreachable-code-return warning in nsGIOProtocolHandler.cpp. r=karlt
netwerk/protocol/gio/nsGIOProtocolHandler.cpp:89:10: warning: 'return' will never be executed [-Wunreachable-code-return]

This `return NS_ERROR_FAILURE` statement at the end of this function is unreachable because all of the preceding switch statement's cases return.

MozReview-Commit-ID: 3qDu2IqTPrW

--HG--
extra : rebase_source : bcd8a07eee82b60fc071787ccb7df7d9f45d0679
2017-08-09 00:38:15 -07:00
Wes Kocher b1fc5e008c Merge inbound to central, a=merge
MozReview-Commit-ID: 4cWGBbMEU2x
2017-08-18 15:53:07 -07:00
Eric Rahm 0938982c90 Bug 1389598 - Part 4: Remove remaining gonk refs. r=froydnj
--HG--
extra : rebase_source : 063c7f95dda063eafabfa1921366bd1957b8fe73
2017-08-11 17:45:18 -07:00
Shane Caraveo 4437e84fb7 Bug 1391720 remove _blank support for background pages, r=kmag
MozReview-Commit-ID: aRpNSrE483

--HG--
extra : rebase_source : f6a037937350ee7d8f502a9060459a073bd60190
2017-08-18 11:30:01 -07:00
Wes Kocher c1383cebf3 Merge m-c to autoland, a=merge
MozReview-Commit-ID: KLrOCT1a7El
2017-08-17 16:23:45 -07:00
Wes Kocher 1d9f00cb8d Merge inbound to m-c a=merge
MozReview-Commit-ID: CQeEqtGlaXh
2017-08-17 16:16:51 -07:00
Michael Kaply 0dbb8dd2bf Bug 1374695 - Add extensionID to addEngine API. r=florian
MozReview-Commit-ID: 5hxzvCXhMxi

--HG--
extra : rebase_source : 93964b926057a79c3e90efc4a291019a740995ac
2017-08-14 15:51:12 -05:00
Carsten "Tomcat" Book 99aa3f8e70 Merge mozilla-central to mozilla-inbound 2017-08-17 13:13:10 +02:00
Nicholas Nethercote 025461bde7 Bug 1390428 (part 1) - Remove many nsXPIDLCString local variables. r=erahm.
These are all easy cases where an nsXPIDLCString local variable is set via
getter_Copies() and then is only used in ways that nsCStrings can also be used
(i.e. no null checks or implicit conversions to |char*|).

In every case the patch trivially replaces the nsXPIDLCString with an
nsCString. (Also, there are a couple of unused nsXPIDLCString variables that
the patch simply removes.)
2017-08-16 13:58:35 +10:00
Bill McCloskey 9edd615af7 Bug 1382922 - Refactor event queue to allow multiple implementations (r=erahm)
This patch refactors the nsThread event queue to clean it up and to make it easier to restructure. The fundamental concepts are as follows:

Each nsThread will have a pointer to a refcounted SynchronizedEventQueue. A SynchronizedEQ takes care of doing the locking and condition variable work when posting and popping events. For the actual storage of events, it delegates to an AbstractEventQueue data structure. It keeps a UniquePtr to the AbstractEventQueue that it uses for storage.

Both SynchronizedEQ and AbstractEventQueue are abstract classes. There is only one concrete implementation of SynchronizedEQ in this patch, which is called ThreadEventQueue. ThreadEventQueue uses locks and condition variables to post and pop events the same way nsThread does. It also encapsulates the functionality that DOM workers need to implement their special event loops (PushEventQueue and PopEventQueue). In later Quantum DOM work, I plan to have another SynchronizedEQ implementation for the main thread, called SchedulerEventQueue. It will have special code for the cooperatively scheduling threads in Quantum DOM.

There are two concrete implementations of AbstractEventQueue in this patch: EventQueue and PrioritizedEventQueue. EventQueue replaces the old nsEventQueue. The other AbstractEventQueue implementation is PrioritizedEventQueue, which uses multiple queues for different event priorities.

The final major piece here is ThreadEventTarget, which splits some of the code for posting events out of nsThread. Eventually, my plan is for multiple cooperatively scheduled nsThreads to be able to share a ThreadEventTarget. In this patch, though, each nsThread has its own ThreadEventTarget. The class's purpose is just to collect some related code together.

One final note: I tried to avoid virtual dispatch overhead as much as possible. Calls to SynchronizedEQ methods do use virtual dispatch, since I plan to use different implementations for different threads with Quantum DOM. But all the calls to EventQueue methods should be non-virtual. Although the methods are declared virtual, all the classes used are final and the concrete classes involved should all be known through templatization.

MozReview-Commit-ID: 9Evtr9oIJvx
2017-08-16 20:55:43 -07:00
Wes Kocher 366445521c Merge m-c to autoland, a=merge
MozReview-Commit-ID: DjSlrmDFfe3
2017-08-16 17:14:41 -07:00
Masatoshi Kimura 9ab81a1042 Bug 1389723 - Remove @deprecated nsIMIMEInputStream.addContentLength. r=dragana
MozReview-Commit-ID: 9b45aozatin

--HG--
extra : rebase_source : 636da171929fe6ecd69de5c68d9ed4064a3a7b09
2017-08-12 13:34:02 +09:00
Michal Novotny 847ee6ab9d Bug 1390683 - HTTP_*_COMPLETE_LOAD probes are used in nsLoadGroup::TelemetryReportChannel when using new cache, r=honzab 2017-08-16 14:06:46 +02:00
Kershaw Chang aa86b2e80c Bug 1388247 - Use SystemGroup to label PCookieServiceChild. r=jdm 2017-08-16 00:05:00 -04:00
Carsten "Tomcat" Book eea1986e03 merge mozilla-inbound to mozilla-central a=merge 2017-08-16 11:23:24 +02:00
Nicholas Nethercote a83fefd956 Bug 1390036 (part 1) - Remove most remaining uses of nsXPIDLString. r=erahm.
CompareCacheHashEntry::mCrit[] is the only case where the nsXPIDLString-ness
was important. The patch adds an explicit SetIsVoid() call to that class's
constructor and changes some null checks to IsVoid() checks.

--HG--
extra : rebase_source : e68befcde4dd098bac2a550bc666eaf3bf1298d7
2017-08-11 18:31:22 +10:00
Michal Novotny f96c866888 Bug 1388684 - RCWN breaks HTTP_CHANNEL_DISPOSITION telemetry, r=mcmanus 2017-08-16 01:11:43 +02:00
Wes Kocher 3945278423 Merge m-c to autoland, a=merge
MozReview-Commit-ID: D96bIJACwZe
2017-08-15 19:16:12 -07:00
Valentin Gosu 97a44a506c Bug 1369317 - Filter and escape URI string in only one pass r=mcmanus
MozReview-Commit-ID: KU4C4cS3jZC

--HG--
extra : rebase_source : 4995b4d8a133b8568af5b130be2077ee90f8b4e4
2017-08-13 10:03:34 +02:00
Valentin Gosu c499c0ebcb Bug 1369317 - Use net_ExtractURLScheme to parse the scheme in nsSimpleURI::SetSpec r=mcmanus
MozReview-Commit-ID: 11c4RS6Lomo

--HG--
extra : rebase_source : bc1dfc585066e09ece9511e6751cf36d33b79bef
2017-08-13 10:03:31 +02:00
Valentin Gosu 7fac981ff5 Bug 1369317 - Make sure nsSimpleURI::SetPathQueryRef escapes its non-ASCII argument r=mcmanus
MozReview-Commit-ID: JBloDTiYFN

--HG--
extra : rebase_source : b465a6bff65297c2e119c3b0a262825788f8346a
2017-08-13 10:03:28 +02:00
Valentin Gosu 8d15eba8a4 Bug 1369317 - Do not escape the returned string in nsSimpleURI::GetAsciiSpec r=mcmanus
The spec is already escaped in SetSpec,SetQuery,SetRef - so there is no need to escape it again in the getter.

MozReview-Commit-ID: C0279q5nLXl

--HG--
extra : rebase_source : 726bda4f13bdab7c3e22eed29f6a8cd9bccb024f
2017-08-13 10:03:10 +02:00