Commit Graph

15044 Commits

Author SHA1 Message Date
Ryan VanderMeulen
24c9581b48 Backed out changeset fbf0e8609abb (bug 1390428) for Windows clipboard test failures on a CLOSED TREE. 2017-08-18 10:58:47 -04:00
Nicholas Nethercote
5241bea863 Bug 1390428 (part 2) - Remove more nsXPIDLCString local variables. r=erahm.
These are all easy cases where an nsXPIDLCString local variable is set via
getter_Copies() and then is used in ways that rely on the implicit conversion
to |char*|. The patch uses get() and EqualsLiteral() calls to replace the
implicit conversions.
2017-08-16 13:58:55 +10: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
Sajjad Arshad
404facfbbc Bug 1388925 - Add an opaque flags to have a fine-grained control over TLS configurations. r=mcmanus, r=keeler
This flags is added in the http channel interface by which developers can control the TLS
connections from JavaScript code (e.g. Add-ons). Basically, all the changes accounted for
plumbing this TLS flags from JavaScript level to C++ code responsible for calling NSS
module. We also added a unit test to make sure that separate connections are created if we
use different tlsFlags. Basically we used a concrete set of flag values that covers the
edge cases and check the hashkey generated in the connection info.

--HG--
rename : netwerk/test/unit/test_separate_connections.js => netwerk/test/unit/test_tls_flags_separate_connections.js
2017-08-16 12:41:16 -07:00
Shane Caraveo
340c39b332 Bug 1368527 add new on-before-connect notification to httpChannel, r=dragana,kmag
MozReview-Commit-ID: 8hiAgY4KzDB

--HG--
extra : rebase_source : d18bbf2ce011cf2236a3cebdc65a750e9ef66c10
2017-08-15 13:11:50 -07:00
Dragana Damjanovic dd.mozilla@gmail.com
7afdc757f4 Bug 1390503 - Retry without fast open if error is NS_ERROR_FAILURE. r=mcmanus 2017-08-15 19:38:16 +02:00
Dragana Damjanovic dd.mozilla@gmail.com
ab18bd067b Bug 1390447 - Check for WSA_IO_INCOMPLETE error after GetOverlappedResult. r=mayhemer 2017-08-15 16:41:47 +02:00
Wes Kocher
7a772df5bf Merge m-c to inbound, a=merge
MozReview-Commit-ID: BYZASFIrXxp
2017-08-14 17:58:17 -07:00
Jim Blandy
e7e6a027d1 Bug 1390230 - Remove unneeded logging message. r=mayhemer 2017-08-14 10:59:23 -07:00
Masatoshi Kimura
74df77800f Bug 1389738 - Remove @deprecated nsIHttpEventSink. r=mcmanus
MozReview-Commit-ID: 5TaiTc6fSLK

--HG--
extra : rebase_source : acbbecb29c61bb1d84efc2fb7418806e61828003
2017-08-12 18:26:23 +09:00
Sebastian Hengst
56c035fa36 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 4cZJ3qFjvPY
2017-08-12 23:49:21 +02:00
Michael Kaply
a231f8e4cd Bug 1380771 - Add support for suggest_url to addEngineWithDetails. r=florian
MozReview-Commit-ID: LoUlLwXqSOH

--HG--
extra : rebase_source : f04cef4ef397a0837af0c310ad004cfde38f9a1d
2017-08-11 16:16:41 -05:00
Wes Kocher
ef0d82bb2b Merge m-c to inbound, a=merge
MozReview-Commit-ID: HSkzFTcnhOy
2017-08-11 13:25:37 -07:00
Wes Kocher
5a4357c768 Merge inbound to central, a=merge
MozReview-Commit-ID: GArkKmOFIVH
2017-08-11 13:15:33 -07:00
Junior Hsu
0ebdaee9c1 Bug 1388671 - Add null check to avoid crash. r=jduell 2017-08-09 20:39:00 -04:00
Ethan
dd89a080a0 Bug 1383495 - Spoof Navigator API platform as win64 when resisting fingerprinting is enabled. r=ehsan 2017-08-11 09:51:09 +08:00
Michal Novotny
5d80c6450d Bug 1369051 - Assertion failure: !entry || !entry->IsFresh() in CacheIndex::UpdateIndex, r=honzab 2017-08-11 12:30:59 +02:00
Lennart Grahl
c2ebc3e45e Bug 979417 - Implement EOR when receiving and explicit EOR when sending on data channels (including DCEP). r=drno,jesup
This allows sending and receiving arbitrarily (we limit to 1 GiB atm) sized
messages while not relying on the deprecated PPID fragmentation/reassembly
mode. The code already supports the ndata extension but it's not activated,
yet. Without the SCTP ndata extension, a large data channel message will
monopolise the SCTP association. While this is a problem, it is a temporary
solution until the extension is being activated. Keep in mind that every
application that uses data channels currently does fragmentation/reassembly on
application-level and it's unlikely that this will change until the popular
implementations (libwebrtc) implement EOR as well. Moreover, until the WebRTC
API specifies an API that hands over partial messages, doing application-level
fragmentation/reassembly is still useful for very large messages (sadly).

We fall back to PPID-based fragmentation/reassembly mode IFF a=max-message-size
is not set in the SDP and the negotiated amount of SCTP inbound streams is
exactly 256. Other implementations should avoid using this combination (to be
precise, other implementations should send a=max-message-size).

It also changes behaviour of RTCDataChannel.send which now raises TypeError in
case the message is too large for the other peer to receive. This is a
necessity to ensure that implementations that do not look at the EOR flag when
receiving are always able to receive our messages. Even if these
implementations do not set a=max-message-size, we use a safe default value (64
KiB, dictated by the spec) that every implementation should be able to receive,
with or without EOR support.

* Due to the use of explicit EOR, this required some major refactoring of all
  send-related and deferred sending functions (which is now a lot less
  complex). There's now only one place where `usrsctp_sendv` is being used.
* All data channel messages and DCEP messages will be sent without copying them
  first. Only in case this fails (e.g. usrsctp's buffer is full), the message
  will be copied and added to a buffer queue.
* Queued data channel messages will now be re-sent fairly (round-robin).
* Maximum message size and the PPID-based fragmentation are configurable using
  about:config (media.peerconnection.sctp.force_ppid_fragmentation and
  media.peerconnection.sctp.force_maximum_message_size).
* Enable interleaving of incoming messages for different streams (preparation
  for SCTP ndata, has no effect until it is enabled).
* Enable interleaving of outgoing messages (disabled if SCTP ndata has not been
  negotiated).
* Add pending messages flag to reduce performance impact from frequent calls to
  SendDeferredMessages.
* Handle partial delivery events (for cases where a partially delivered message
  is being aborted).
* Close a data channel/the connection in case the message is too large to be
  handled (this is only applied in cases where the remote peer ignores our
  announced local maximum message size).
* Various size_t to uint32_t conversions (message length) and back should be
  safe now.
* Remove aUsingDtls/mUsingDtls from DataChannelConnection.
* Set maximum message size in SDP and in the data channel stack.
* Replace implicit NS_ENSURE_*'s with explicit NS_WARN_IF's.
* Add SetMaxMessageSize method for late-applying those signalling parameters
  when a data channel has been created before the remote SDP was available.
* Limit remote maximum message size and add a GetMaxMessageSize method for a
  future implementation of RTCSctpTransport.maxMessageSize.

MozReview-Commit-ID: FlmZrpC5zVI

--HG--
extra : rebase_source : 54e1b838c788a3abbded4fb32fe7c2788f8a9bc0
2017-07-26 13:18:54 +02:00
Wes Kocher
d807031b06 Backed out changeset 16c09e5f2758 (bug 1380771) for failures in test_hasEngineWithURL.js and browser_ext_settings_overrides_search.js a=backout
MozReview-Commit-ID: 75JIIqWhS7W
2017-08-11 15:53:50 -07:00
Michael Kaply
2db241f0bd Bug 1380771 - Add support for suggest_url to addEngineWithDetails. r=florian
MozReview-Commit-ID: LoUlLwXqSOH

--HG--
extra : rebase_source : 04ff1c46118a490b46b452e0729690d312cdc715
2017-08-11 16:16:41 -05:00
Thomas Wisniewski
54acd62118 Bug 1261289 - Follow-up: remove the word 'only' from a comment so it is more accurate. r=ntim 2017-08-11 09:15:11 -04:00
Wes Kocher
936a9461f6 Merge inbound to m-c a=merge
MozReview-Commit-ID: KRQeIGmhAPA
2017-08-10 18:14:34 -07:00
Sebastian Hengst
51d351f567 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-08-10 17:41:11 +02:00
Sylvestre Ledru
7ed5c41a4c Bug 1388994 - GetRequestingPrincipal: Pass parameter by ref instead of value r=dragana
MozReview-Commit-ID: 5iD8HF0PQfs

--HG--
extra : rebase_source : 516bbfa30168779200fdca09033a5d1b3f1d884b
2017-08-10 08:47:26 +02:00
Valentin Gosu
b3e75dbf06 Bug 1386683 - Do not escape the ' character in the URL hash r=junior
MozReview-Commit-ID: DkoDvWGbWfu

--HG--
extra : rebase_source : 22de804e82136114a0688ce271cac8c49f8c4f23
2017-08-06 11:13:04 +02:00
Haik Aftandilian
f5314b4f60 Bug 1386832 - Part 2 - Make Linux dev build security check exception not depend on MOZ_DEVELOPER_REPO. r=jimm
For Linux dev builds, change the developer build unpacked security check
exception to not depend on knowing the repo dir because MOZ_DEVELOPER_REPO
isn't reliably set whenever the firefox binary is run. Instead, make sure the
extension root directory is within NS_GRE_DIR. Use both checks on Mac.

MozReview-Commit-ID: IsbbNS58yf8

--HG--
extra : rebase_source : 64d1008a0513938edc111d12cb9fb28d2048ac82
2017-08-09 16:11:59 -07:00
Valentin Gosu
3b95ce67d2 Bug 1380617 - Fix tests that use nsIURI.host expecting unicode domain name r=smaug,honzab
MozReview-Commit-ID: GKnbpc8GMb2
2017-08-09 17:44:06 +02:00
Valentin Gosu
7520c99a2c Bug 1380617 - Add nsIURI.displayPrePath r=mcmanus,Gijs
- Use displayPrePath in the pageInfo permissions that shows "Permissions for:"
- The extra displayPrePath method is necessary because it's difficult to compute it manually, as opposed to not having a displaySpecWithoutRef - as it's easy to get that by truncating displaySpec at the first '#' symbol.

MozReview-Commit-ID: 9RM5kQ2OqfC
2017-08-09 17:43:58 +02:00
Jonathan Kew
009efa5e70 Bug 1340910 - pt 2+3 - Import Brotli 0.6.0 from upstream, and Gecko updates required to work with Brotli 0.6.0 API changes. r=glandium 2017-08-09 11:45:39 +01:00
Thomas Wisniewski
c20797f0fa Bug 1261289 - Allow webextensions to open view-source links. r=mixedpuppy, r=smaug
MozReview-Commit-ID: A8TGE448vBs
2017-06-20 15:23:49 -04:00
Wes Kocher
39b73cc234 Merge m-c to inbound, a=merge
MozReview-Commit-ID: 3prpvFA27fd
2017-08-10 18:24:04 -07:00
Dragana Damjanovic
4372964815 Bug 1389079 - A work around until bug 1386719 lands. r=mcmanus 2017-08-10 23:29:34 +02:00
Dragana Damjanovic
a7386daa3f Bug 1363372 - Wait until OVERLAPPED structure return a result before distroying a socket. r=mcmanus 2017-07-27 11:37:11 +02:00
Thomas Wisniewski
7acd2dd485 Bug 1286554 - Remove network.http.keep_empty_response_headers_as_empty_string. r=jduell
MozReview-Commit-ID: 3b1Gpi6tit0
2016-07-13 10:40:29 -04:00