Commit Graph

6585 Commits

Author SHA1 Message Date
Nikhil Marathe
b4ab0e78f8 Bug 1184798 - Ensure workers loads are treated as non-subresource fetches. r=jdm 2015-09-17 11:56:41 -07:00
Patrick McManus
bb91433844 bug 366559 - backout due to android build bustage patch 7 on CLOSED TREE r=backout 2015-09-22 12:47:25 -04:00
Patrick McManus
a4bec76373 bug 366559 - patch 7, content-encoding brotli for https r=bagder 2015-09-18 18:04:28 -04:00
Patrick McManus
e96a451bfd bug 366559 - patch 6, support different content encodings for http vs https r=bagder 2015-09-19 18:51:32 -04:00
Patrick McManus
53bc1e7c18 bug 366559 - patch 5, fix nsHTTPCompressConv manual addref r=bagder 2015-09-18 13:58:14 -04:00
Patrick McManus
db41bb4d4f bug 366559 - patch 4, fix nsHTTPCompressConv namespace r=bagder 2015-09-18 21:24:28 -04:00
Patrick McManus
78a392e53d bug 366559 - patch 3, fix nsHTTPCompressConv bracing style r=bagder 2015-09-18 13:54:01 -04:00
Patrick McManus
4daf14c90d bug 366559 - patch 2, fix nsHTTPCompressConv indentation r=bagder 2015-09-18 13:48:50 -04:00
Nathan Froyd
6f8bd8b8e5 Bug 1202497 - part 7 - make nsEventQueue use external locking; r=gerald
We want to ensure that nsThread's use of nsEventQueue uses locking done
in nsThread instead of nsEventQueue, for efficiency's sake: we only need
to lock once in nsThread, rather than the current situation of locking
in nsThread and additionally in nsEventQueue.  With the current
structure of nsEventQueue, that would mean that nsThread should be using
a Monitor internally, rather than a Mutex.

Which would be well and good, except that DOM workers use nsThread's
mutex to protect their own, internal CondVar.  Switching nsThread to use
a Monitor would mean that either:

- DOM workers drop their internal CondVar in favor of nsThread's
  Monitor-owned CondVar.  This change seems unlikely to work out well,
  because now the Monitor-owned CondVar is performing double duty:
  tracking availability of events in nsThread's event queue and
  additionally whatever DOM workers were using a CondVar for.  Having a
  single CondVar track two things in such a fashion is for Experts Only.

- DOM workers grow their own Mutex to protect their own CondVar.  Adding
  a mutex like this would change locking in subtle ways and seems
  unlikely to lead to success.

Using a Monitor in nsThread is therefore untenable, and we would like to
retain the current Mutex that lives in nsThread.  Therefore, we need to
have nsEventQueue manage its own condition variable and push the
required (Mutex) locking to the client of nsEventQueue.  This scheme
also seems more fitting: external clients merely need synchronized
access to the event queue; the details of managing notifications about
events in the event queue should be left up to the event queue itself.

Doing so also forces us to merge nsEventQueueBase and nsEventQueue:
there's no way to have nsEventQueueBase require an externally-defined
Mutex and then have nsEventQueue subclass nsEventQueueBase and provide
its own Mutex to the superclass.  C++ initialization rules (and the way
things like CondVar are constructed) simply forbid it.  But that's OK,
because we want a world where nsEventQueue is externally locked anyway,
so there's no reason to have separate classes here.

One casualty of this work is removing ChaosMode support from
nsEventQueue.  nsEventQueue had support to delay placing events into the
queue, theoretically giving other threads the chance to put events there
first.  Unfortunately, since the thread would have been holding a lock
(as is evident from the MutexAutoLock& parameter required), sleeping in
PutEvent accomplishes nothing but delaying the thread from getting
useful work done.  We should support this, but it's complicated to
figure out how to reasonably support this right now.

A wrinkle in this overall pleasant refactoring is that nsThreadPool's
threads wait for limited amounts of time for new events to be placed in
the event queue, so that they can shut themselves down if no new events
are appearing.  Setting limits on the number of threads also needs to be
able to wake up all threads, so threads can shut themselves down if
necessary.

Unfortunately, with the transition to nsEventQueue managing its own
condition variable, there's no way for nsThreadPool to perform these
functions, since there's no Monitor to wait on.  Therefore, we add a
private API for accessing the condition variable and performing the
tasks nsThreadPool needs.

Prior to all the previous patches, placing items in an nsThread's event
queue required three lock/unlock pairs: one for nsThread's Mutex, one to
enter nsEventQueue's ReentrantMonitor, and one to exit nsEventQueue's
ReentrantMonitor.  The upshot of all this work is that we now only
require one lock/unlock pair in nsThread itself, as things should be.
2015-09-20 05:13:09 -04:00
Nathan Froyd
4f4449fa7a Bug 1202497 - part 6 - make the locking requirements of nsEventQueue explicit; r=gerald
Like the previous patch, this patch is a no-op change in terms of
functionality.  It does, however, pave part of the way for forcing
clients of nsEventQueue to provide their own locking.
2015-09-21 04:34:51 -04:00
hchang
3019c0d1cf Bug 1205228 - Change PackagedAppVerifier to notify the verification result asynchronously. r=valentin. 2015-09-21 03:11:00 +02:00
Ehsan Akhgari
297fd8d67e Bug 1206894 follow-up: Add a null check 2015-09-21 22:13:39 -04:00
Ehsan Akhgari
527bf87e31 Bug 1206894 - Enable asynchronous dispatching of fetch events; r=jdm
This refactoring patch separates the preparation of the fetch event
object from its dispatching, so that consumers would be able to
dispatch the event asynchronously.
2015-09-21 20:59:27 -04:00
Patrick McManus
c9da2d7d4f bug 1206771 - fix reentrantFlag compiler warning on >= beta r=jduell 2015-09-21 13:22:23 -04:00
Josh Matthews
6d7a9f43d5 Bug 885982 - Part 3: Add e10s support to TCPSocket and TCPServerSocket. r=asuth,mayhemer,bz 2015-03-25 10:36:56 -04:00
Christoph Kerschbaumer
3f628c1ad1 Bug 1204703 - Add AsyncOpen2 to channels within JS tests (r=sicking) 2015-09-18 09:27:52 -07:00
Wes Kocher
0484e3d976 Backed out 3 changesets (bug 1143922) for landing with the wrong bug number
Backed out changeset 309b4d1ab81c (bug 1143922)
Backed out changeset deda472458fd (bug 1143922)
Backed out changeset 977d5b7ecba3 (bug 1143922)
2015-09-18 14:13:33 -07:00
Patrick McManus
525b5b4925 bug 1187239 - ontransportstatus SENDING_TO should not use request stream re-entrantly r=hurley r=bz 2015-09-15 18:12:37 -04:00
Christoph Kerschbaumer
672cda2d6d Bug 1143922 - Add AsyncOpen2 to channels within JS tests (r=sicking) 2015-09-18 09:27:52 -07:00
Ben Kelly
363da6eafe Bug 1206084 Always Cancel() channel in nsCORSListenerProxy for failed redirects. r=ehsan 2015-09-18 07:15:39 -07:00
Nicholas Hurley
b534240eb0 Bug 1198058 - Fix crashes inspecting loadGroups in browser toolbox. r=mcmanus 2015-09-16 09:31:19 -07:00
Andrea Marchesini
fbb8326525 Bug 1163545 - Bypass AppCache completely when Service Workers supported & registered, r=jdm 2015-09-18 10:18:38 +08:00
Patrick McManus
d73fcf551d Bug 1205810 - telemetry for local h2 goaway code r=hurley 2015-09-17 15:26:59 -04:00
Daniel Stenberg
7b3dbc75b4 Bug 1205266 - log network-change events on Mac. r=mcmanus 2015-09-16 06:15:00 +02:00
Dragana Damjanovic
a907dde1d9 Bug 1204529 - mMaxTimePerPollIter should be atomic. r=mcmanus 2015-09-16 10:23:00 +02:00
Lee Salzman
12c3574dbe Bug 1205016: double ClosingService thread stack size to avoid stack overflow r=glandium 2015-09-16 20:31:43 -04:00
Simon Montagu
83f842a831 Bug 843689: make network.IDN.use_whitelist pref default to false preparatory to removing it completely, r=gerv 2015-09-16 13:53:18 -07:00
Nicholas Nethercote
6855b78fbf Bug 1201135 - Rename pldhash.{h,cpp} to PLDHashTable.{h,cpp}. r=mccr8. 2015-09-15 20:49:53 -07:00
Phil Ringnalda
e9e29e9a15 Back out 3 changesets (bug 1204596) for b2g test_fetch_cors.html failures
Backed out changeset 2662a1ad4cad (bug 1204596)
Backed out changeset cfc4c4ecbbf5 (bug 1204596)
Backed out changeset d10c6f32ce46 (bug 1204596)
2015-09-16 20:51:17 -07:00
Ehsan Akhgari
69e3accaae Bug 1204596 - Part 1: Avoid overriding the channel final URI when it gets intercepted; r=nsm,bkelly 2015-09-16 20:38:19 -04:00
Patrick McManus
d814ac0d0c bug 1204614 - test for h2 per stream flow control r=hurley 2015-09-14 14:08:10 -04:00
Patrick McManus
357e0e244c bug 1204614 - use h2 per stream flow control to deal with suspended channels r=hurley 2015-09-11 15:53:27 -04:00
Patrick McManus
966dd0a6dd Bug 1204731 - telemetry for peer h2 goaway r=hurley 2015-09-14 21:55:06 -04:00
Francois Marier
783e5028de Bug 1205138 - Cleanup tracking protection warnings and logs. r=gcp 2015-09-16 16:42:08 -07:00
Nathan Froyd
ccb9ab203d Bug 1156974 - mark CacheFileHandle::mIsDoomed as a release/acquire Atomic variable; r=michal 2015-08-04 00:32:36 -04:00
Nathan Froyd
eed73d1bdd Bug 1203658 - mark Linux's nsNotifyAddrListener::mChildThreadShutdown member as Atomic; r=bagder
Relaxed memory consistency here is OK; the only concern here is that the
child thread eventually goes away, not that it does so immediately after
we've signaled that it should go away.
2015-09-10 23:53:42 -04:00
Christoph Kerschbaumer
8d9fa0df4f Bug 1205158 - Use channel->Open2() netwerk/test/ (r=sicking) 2015-09-15 20:12:52 -07:00
Nigel Babu
2c66fb8d92 Backed out changeset d5d0b5994149 (bug 1152046) for b2g debug hustdown hangs
CLOSED TREE
2015-09-16 11:44:12 +05:30
Nicholas Nethercote
56c20ce841 Bug 1204919 - Build osx_corewlan.mm with -Wno-error=objc-method-access to avoid bustage on some machines in warnings-on-errors builds. r=glandium. 2015-09-16 09:41:52 +10:00
Patrick McManus
4c3af8db9b bug 1152046 - Revert Make separate thread only for PRClose. r=backout
This reverts commit 760a84e7cf7fa49c889a5a17a5935d3ca1e02384.
2015-09-15 21:40:28 -04:00
Nicholas Nethercote
ac3ae5e6c1 Bug 1121760 (part 6) - Move all remaining PL_DHash*() functions into PLDHashTable. r=poiru. 2015-09-14 14:23:47 -07:00
Nicholas Nethercote
5c91fcd1e6 Bug 1121760 (part 3) - Remove PL_DHashTableRemove(). r=poiru. 2015-09-14 14:23:24 -07:00
Nicholas Nethercote
538c6626e9 Bug 1121760 (part 2) - Remove PL_DHashTableAdd(). r=poiru. 2015-09-14 14:23:12 -07:00
Nicholas Nethercote
ba83ffc5ec Bug 1121760 (part 1) - Remove PL_DHashTableSearch(). r=poiru. 2015-05-21 00:34:25 -07:00
Shu-yu Guo
45211869c8 Bug 1202902 - Mass replace toplevel 'let' with 'var' in preparation for global lexical scope. (rs=jorendorff) 2015-09-15 11:19:45 -07:00
Ben Kelly
4afac52134 Bug 1203680 P8 nsCORSListenerProxy::OnStartRequest must always call outer OnStartRequest. r=ehsan 2015-09-15 10:15:45 -07:00
Ben Kelly
4dff520b3d Bug 1203680 P7 Fix e10s handling on interceptions resulting in redirect status codes. r=jdm 2015-09-15 10:15:45 -07:00
Ben Kelly
118647a2cf Bug 1203680 P3 Add a method to ensure an http upload stream is directly cloneable. r=mcmanus 2015-09-15 10:15:45 -07:00
Dragana Damjanovic
e17d5fb5ac Bug 1204043 - remove mServeMultipleEventsPerPollIter pref. r=mcmanus 2015-09-15 05:10:00 +02:00
Christoph Kerschbaumer
e790d5b2a7 Bug 1204648 - Support AsyncOpen2,Open2,nsIUploadChannel and nsIUploadChannel2 on nsSecCheckWrapChannelBase. r=sicking 2015-09-14 14:21:03 -07:00