Commit Graph

11795 Commits

Author SHA1 Message Date
Valentin Gosu
b489e23bca Bug 1172701 - Make GetSubresourceURI normalize the path for packaged resources r=mcmanus 2015-08-12 00:43:48 +02:00
Christoph Kerschbaumer
a606a3d701 Bug 1188644 - Use channel->ascynOpen2 in netwerk/test (r=mcmanus) 2015-08-10 10:20:40 -07:00
Kyle Huey
76e3009ab8 Bug 1179909: Refactor stable state handling. r=smaug
This is motivated by three separate but related problems:

1. Our concept of recursion depth is broken for things that run from AfterProcessNextEvent observers (e.g. Promises). We decrement the recursionDepth counter before firing observers, so a Promise callback running at the lowest event loop depth has a recursion depth of 0 (whereas a regular nsIRunnable would be 1). This is a problem because it's impossible to distinguish a Promise running after a sync XHR's onreadystatechange handler from a top-level event (since the former runs with depth 2 - 1 = 1, and the latter runs with just 1).

2. The nsIThreadObserver mechanism that is used by a lot of code to run "after" the current event is a poor fit for anything that runs script. First, the order the observers fire in is the order they were added, not anything fixed by spec. Additionally, running script can cause the event loop to spin, which is a big source of pain here (bholley has some nasty bug caused by this).

3. We run Promises from different points in the code for workers and main thread. The latter runs from XPConnect's nsIThreadObserver callbacks, while the former runs from a hardcoded call to run Promises in the worker event loop. What workers do is particularly problematic because it means we can't get the right recursion depth no matter what we do to nsThread.

The solve this, this patch does the following:

1. Consolidate some handling of microtasks and all handling of stable state from appshell and WorkerPrivate into CycleCollectedJSRuntime.
2. Make the recursionDepth counter only available to CycleCollectedJSRuntime (and its consumers) and remove it from the nsIThreadInternal and nsIThreadObserver APIs.
3. Adjust the recursionDepth counter so that microtasks run with the recursionDepth of the task they are associated with.
4. Introduce the concept of metastable state to replace appshell's RunBeforeNextEvent. Metastable state is reached after every microtask or task is completed. This provides the semantics that bent and I want for IndexedDB, where transactions autocommit at the end of a microtask and do not "spill" from one microtask into a subsequent microtask. This differs from appshell's RunBeforeNextEvent in two ways:
a) It fires between microtasks, which was the motivation for starting this.
b) It no longer ensures that we're at the same event loop depth in the native event queue. bent decided we don't care about this.
5. Reorder stable state to happen after microtasks such as Promises, per HTML. Right now we call the regular thread observers, including appshell, before the main thread observer (XPConnect), so stable state tasks happen before microtasks.
2015-08-11 06:10:46 -07:00
Michal Novotny
a2ea01da63 Bug 1179255 - (fatal) Assertion failure: aRequest == mCancelable, at netwerk/protocol/websocket/WebSocketChannel.cpp:2766, r=mcmanus 2015-08-11 14:50:08 +02:00
Nicholas Nethercote
fd1fcf1481 Bug 1182961 (part 2, attempt 2) - Use nsTHashtable::Iterator in CacheIndex. r=michal.
--HG--
extra : rebase_source : f1e111eee99e570c4766a55aefb2906dd12362d6
2015-07-26 20:15:36 -07:00
Henry Chang
5d76bd45e9 Bug 1181137 - Copy all headers from base channel to subresources in the packaged app. r=honzab 2015-07-28 15:34:35 +08:00
Valentin Gosu
4f8b38c03b Bug 1190502 - RESOLVE_DISABLE_IPV4 returns A records r=mcmanus
nsHostResolver::ThreadFunc should not override addressFamily with PR_AF_UNSPEC
for IPv6 since GetAddrInfo.cpp::GetAddrInfo() can handle PR_AF_INET6.
_GetAddrInfo_Portable does this before calling PR_GetAddrInfoByName and
creates the AddrInfo with a disableIPv4 flag if necessary.
2015-08-10 11:22:02 +02:00
Valentin Gosu
edb231d431 Bug 1187159 - Add mochitest for loading packaged apps (iframe+fetch+mozapp) r=jduell 2015-08-10 11:21:59 +02:00
Valentin Gosu
e188358d0d Bug 1187159 - Pass principal and flags from the requesting channel to the packaged app channel r=honzab 2015-08-10 11:21:57 +02:00
Nicholas Nethercote
bf4d4d1817 Bug 1182961 (part 1, attempt 2) - Use nsTHashtable::Iterator in CacheIndex. r=michal. 2015-07-28 21:14:39 -07:00
Nicholas Nethercote
cf3a9d61c8 Bug 1182961 (part 3, attempt 2) - Use nsTHashtable::Iterator in CacheIndex. r=michal.
--HG--
extra : rebase_source : 2cb02728091d14c08092325eb7c6da031676e1d7
2015-07-26 20:35:31 -07:00
Ehsan Akhgari
464bb68db3 Backout the tests for bug 1187159 for leaks 2015-08-08 18:13:51 -04:00
Ehsan Akhgari
2c853152f1 Backout bug 1190502 for leaks 2015-08-08 18:13:02 -04:00
Sebastian Hengst
14eb00afeb $ hg backout -r 618c213ed8db -r 78a61d56adae -r ca1510a96cc6 -m "Backed out 618c213ed8db (bug 1190502) and 78a61d56adae, ca1510a96cc6 (bug 1187159) for Linux x64 asan M5 fail: LeakSanitizer | leak at mozilla::net::GetLoadContextInfo, mozilla::net::nsHttpChannel::BeginConnect, mozilla::net::nsHttpChannel::OnProxyAvailable. r=backout" 2015-08-08 11:08:13 +02:00
Valentin Gosu
7bab44bfcd Bug 1190502 - RESOLVE_DISABLE_IPV4 returns A records r=mcmanus
nsHostResolver::ThreadFunc should not override addressFamily with PR_AF_UNSPEC
for IPv6 since GetAddrInfo.cpp::GetAddrInfo() can handle PR_AF_INET6.
_GetAddrInfo_Portable does this before calling PR_GetAddrInfoByName and
creates the AddrInfo with a disableIPv4 flag if necessary.
2015-08-08 07:12:02 +02:00
Valentin Gosu
f9a1c98968 Bug 1187159 - Add mochitest for loading packaged apps (iframe+fetch+mozapp) r=jduell 2015-08-08 07:11:58 +02:00
Valentin Gosu
1e73e39a9d Bug 1187159 - Pass principal and flags from the requesting channel to the packaged app channel r=honzab 2015-08-08 07:11:56 +02:00
Ryan VanderMeulen
60100a0722 Merge m-c to inbound. a=merge 2015-08-07 16:13:43 -04:00
Francois Marier
e5ccece7d7 Bug 1141352 - add a pairwise allowlist to tracking protection. r=gcp
--HG--
rename : toolkit/components/url-classifier/tests/mochitest/test_privatebrowsing_trackingprotection.html => toolkit/components/url-classifier/tests/mochitest/test_trackingprotection_whitelist.html
rename : toolkit/components/url-classifier/tests/mochitest/classifiedAnnotatedPBFrame.html => toolkit/components/url-classifier/tests/mochitest/whitelistFrame.html
2015-08-07 13:08:22 -07:00
Daniel Stenberg
f79456b39f Bug 1191258 - check for IFF_RUNNING to detect online interfaces. r=mcmanus 2015-08-05 03:22:00 +02:00
Nicholas Nethercote
01846026c1 Bug 1182961 (part 5, attempt 2) - Use nsTHashtable::Iterator in nsCookieService. r=michal. 2015-07-26 23:40:51 -07:00
Nicholas Nethercote
6eb030ce06 Bug 1182961 (part 4, attempt 2) - Use nsTHashtable::Iterator in CacheFileHandles. r=michal. 2015-07-26 23:31:22 -07:00
Nicholas Nethercote
daab3fdaf7 Backout bff74cecc67c, ffe0edb2aae7, b60b7c267cef, 6da154b43265, bcf6fd3ab9bb (bug 1182961 parts 1--5) for possible intermittent failures and performance problems.
--HG--
extra : rebase_source : 97ab1452e462b1ff24cc77bdadf2a6e82800690d
2015-08-06 16:30:47 -07:00
Daniel Stenberg
960cf2a463 Bug 1191253 - Start the "Link Monitor" thread appropriately. r=mcmanus 2015-08-05 03:13:00 -04:00
Cykesiopka
d93ee984a0 Bug 1124649 - Part 1 - Add specific error messages for various types of STS and PKP header failures. r=keeler,hurley
--HG--
extra : rebase_source : 8210ed5f89cec8c42d5a78b9101f1c54d91e04c6
2015-08-05 07:51:00 +02:00
Wes Kocher
de08e9e79c Merge m-c to inbound, a=merge 2015-08-05 16:47:52 -07:00
Wes Kocher
4d0e220d7f Merge b2ginbound to central, a=merge 2015-08-05 16:45:41 -07:00
Ehsan Akhgari
b71438b17e Bug 1191144 - Remove CACHE_SERVICE_LOCK_WAIT_MAINTHREAD_NSCACHESERVICE_LEAVEPRIVATEBROWSING; r=michal 2015-08-05 11:42:21 -04:00
Patrick McManus
94d981e0c3 Bug 1191291 - convert nsHttpChannel::RetargetDeliveryTo warning to log r=michal.novotny 2015-08-05 09:09:48 -04:00
Carsten "Tomcat" Book
dcc3c5d093 Merge mozilla-central to b2g-inbound 2015-08-05 13:40:29 +02:00
Liang-Heng Chen
a9c1e1a537 Bug 1175387 - close file descriptor after detached from STS. r=mcmanus 2015-08-04 20:01:00 +02:00
Patrick McManus
8f497598a6 bug 1189692 - add telem for quic advertisements r=hurley 2015-07-31 05:43:24 -04:00
Patrick McManus
ec93d8cde4 bug 1189645 - remove spdy telem r=hurley 2015-07-31 04:07:07 -04:00
Nicholas Nethercote
b32aa53dc2 Bug 1182961 (part 5) - Use nsTHashtable::Iterator in nsCookieService. r=michal.
--HG--
extra : rebase_source : a43f8ec3918bbdb226079f6d4503a0b117639863
2015-07-26 23:40:51 -07:00
Nicholas Nethercote
72530c51ab Bug 1182961 (part 4) - Use nsTHashtable::Iterator in CacheFileHandles. r=michal.
--HG--
extra : rebase_source : 35c5892e4fa4c754fade81846d2d1fcb75ced93d
2015-07-26 23:31:22 -07:00
Nicholas Nethercote
c9f9c763d3 Bug 1182961 (part 3) - Use nsTHashtable::Iterator in CacheIndex. r=michal.
--HG--
extra : rebase_source : b0011c4c261846bf314c867790b1315b6c2ca6d7
2015-07-26 20:35:31 -07:00
Nicholas Nethercote
68e8f70a14 Bug 1182961 (part 2) - Use nsTHashtable::Iterator in CacheIndex. r=michal.
--HG--
extra : rebase_source : d3f035201da0c526da3003f30f8719a2635a9a09
2015-07-26 20:15:36 -07:00
Nicholas Nethercote
4535e7d710 Bug 1182961 (part 1) - Use nsTHashtable::Iterator in CacheIndex. r=michal.
--HG--
extra : rebase_source : cc650176cc87916c6683705ca9aa1954d30d1c0d
2015-07-28 21:14:39 -07:00
Birunthan Mohanathas
7315345693 Bug 1191100 - Remove XPIDL signature comments in .cpp files. r=ehsan
Comment-only so DONTBUILD.
2015-08-04 16:17:36 -07:00
Ehsan Akhgari
ec6c2f89ae Bug 1185982 - Remove the unused NotifyNetworkActivity::mObs member; r=bagder 2015-08-04 18:29:58 -04:00
Nicholas Hurley
65fb80c877 Bug 1190985 - Fix data race in DebugMutexAutoLock r=mcmanus
--HG--
extra : rebase_source : 27a37b0244ae734e39291ae298d65593c9c83f67
2015-08-04 14:16:49 -07:00
Nicholas Nethercote
d98d14fa1e Bug 1189156 (part 4) - Don't use enumeration style for nsBaseHashtable::SizeOf{In,Ex}cludingThis(). r=erahm,jfkthame.
After this change, we have ShallowSizeOf{In,Ex}cludingThis(), which don't do
anything to measure children. (They can be combined with iteration to measure
children.)

--HG--
extra : rebase_source : f98420176f50990bbc5a25e35788328154cfeb00
2015-07-30 21:19:57 -07:00
Nicholas Nethercote
1059c1de13 Bug 1189156 (part 2) - Don't use enumeration style for nsTHashtable::SizeOf{In,Ex}cludingThis(). r=erahm.
After this change, we have ShallowSizeOf{In,Ex}cludingThis(), which don't do
anything to measure children. (They can be combined with iteration to measure
children.)

And we still have the existing single-arg SizeOf{In,Ex}cluding() functions,
which work if the entry type itself defines SizeOfExcludingThis().

--HG--
extra : rebase_source : f93de9b789c21b1b148bed9de795f663f77c9dd9
2015-07-29 01:50:52 -07:00
Nicholas Hurley
fe87d76bdf No bug - Remove extra printf left over from bug 1127618. r=smaug
--HG--
extra : rebase_source : 54a59b88da1cf33d22e479e07ec7f9bcd8f98f65
2015-08-03 14:14:39 -07:00
Nicholas Hurley
16407ea724 Bug 1127618 - make push caches work in e10s. r=mcmanus r=froydnj IGNORE IDL
--HG--
extra : rebase_source : 24dd37c6eaec83a1776d77632b97106e8abb8015
2015-07-31 13:50:08 -07:00
Nicholas Hurley
d61d6f4984 Bug 1127618 (prereq) - Fix compile errors caused by files moving from one unified file to another. r=mcmanus
--HG--
extra : rebase_source : b4f3b2487e5a7393114067ffd632c9df6c767b73
2015-07-31 13:48:26 -07:00
Valentin Gosu
089141cbff Bug 1189852 - link broken when a line break is part of the hash r=mcmanus 2015-08-03 21:00:16 +02:00
Nicholas Hurley
abb4485542 Bug 1152048 - Send wakeup notification asynchronously to avoid reentrancy issues. r=bagder
--HG--
extra : rebase_source : 059c2292f443c972e144256298987e05f22c58f3
extra : histedit_source : 1ff8d3674fc3c911f83b80d920ee57f7d00def1a
2015-07-31 13:39:48 -07:00
Nicholas Hurley
e3cddeaf6a Bug 1152048 - Make the RELEASE_ASSERT on the sts lock a DIAGNOSTIC_ASSERT. r=bagder
--HG--
extra : rebase_source : ad174342a2ed85229611a848314776d8c5568287
extra : histedit_source : dea062e08393566ab0b00c8afa2ff3d1f3d302fe
2015-07-31 13:33:48 -07:00
David Keeler
59ef11f506 bug 1188100 - fold PSM's test_client_cert.js into necko's test_tls_server.js r=mcmanus
--HG--
rename : security/manager/ssl/tests/unit/test_client_cert/cert_dialog.js => netwerk/test/unit/client_cert_chooser.js
rename : security/manager/ssl/tests/unit/test_client_cert/cert_dialog.manifest => netwerk/test/unit/client_cert_chooser.manifest
extra : amend_source : 249efd8e1bc537cf14b3199865df18b8aba62d10
2015-07-29 14:27:54 -07:00