Commit Graph

75 Commits

Author SHA1 Message Date
Sylvestre Ledru
e226046cb8 Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan
# ignore-this-changeset

Depends on D28954

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

--HG--
extra : moz-landing-system : lando
2019-05-01 08:47:10 +00:00
Dragana Damjanovic
2ebce46fd8 Bug 1415625 - Use Telemetry::CanRecordPreReleaseData instead of toolkit.telemetry.enabled. Remove network.allow-experiments because it is not used. r=michal
Differential Revision: https://phabricator.services.mozilla.com/D12745

--HG--
extra : moz-landing-system : lando
2018-12-18 17:19:29 +00:00
Benjamin Bouvier
a7f1d173a0 Bug 1511383: Update vim modelines after clang-format; r=sylvestre
- modify line wrap up to 80 chars; (tw=80)
- modify size of tab to 2 chars everywhere; (sts=2, sw=2)

--HG--
extra : rebase_source : 7eedce0311b340c9a5a1265dc42d3121cc0f32a0
extra : amend_source : 9cb4ffdd5005f5c4c14172390dd00b04b2066cd7
2018-11-30 16:39:55 +01:00
Sylvestre Ledru
265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Byron Campen [:bwc]
e6218aee8a Bug 1494312 - Part 2: Make the internal PC stats API based on MozPromise. r=mjf,mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D11776

--HG--
extra : moz-landing-system : lando
2018-11-23 16:46:52 +00:00
Kershaw Chang
1d281934cf Bug 1452535 - Move some logs to level 1 r=mayhemer
WPT parses HTTP log and create a HAR file. To reduce the overhead of logging, this patch moves some logs that are used by WPT parser to level 1.

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

--HG--
extra : moz-landing-system : lando
2018-11-16 16:35:52 +00:00
Dragana Damjanovic
9cadc84486 Bug 1473736 - Implement necko part of ESNI r=mak,kmag,mcmanus
--HG--
extra : rebase_source : be79870960953ef9535ccb6a440515ec4a8232d5
extra : histedit_source : 8096ab2eaf246cbbeb97bace0531b86b8c69ff66
2018-09-22 23:54:11 +03:00
Gurzau Raul
07d30b811f Backed out changeset dc225279994a (bug 1473736) for web platform leaks 2018-09-21 04:30:10 +03:00
Dragana Damjanovic
70e0646d75 Bug 1473736 - Implement necko part of ESNI r=mak,kmag,mcmanus
Implement necko part of ESNI

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

--HG--
extra : moz-landing-system : lando
2018-09-20 20:53:28 +00:00
Noemi Erli
efdd6a208a Backed out changeset 7aa742bff8fb (bug 1473736) for xpcshell failures and bc failures in browser_urlbarSearchSingleWordNotification.js 2018-09-18 22:07:58 +03:00
Dragana Damjanovic
f000a5b4b0 Bug 1473736 - Implement necko part of ESNI r=mcmanus
Implement necko part of ESNI

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

--HG--
extra : moz-landing-system : lando
2018-09-17 23:08:14 +00:00
Honza Bambas
0a40274f51 Bug 1469117 - Make sure we reset network socket timeout epoch to 0 when timeout on a socket is turned off r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D3880

--HG--
extra : moz-landing-system : lando
2018-08-21 14:33:52 +00:00
Kris Maglione
f1400534b8 Bug 1473631: Part 2 - Replace pref observers with callbacks in STS. r=njn
MozReview-Commit-ID: BUiQqMA8eVs

--HG--
extra : rebase_source : 0b9571fb151220db1852bebd8149aaaf3e987ddb
2018-07-05 13:15:52 -07:00
Honza Bambas
8a9d38fe70 Bug 1442178 - Do a busy wait of socket poll() shortly after network change detection, r=dragana 2018-05-30 17:36:42 +03:00
Honza Bambas
dab22ca3b9 Bug 1442178 - Repair broken socket polling wakeup mechanism after a network change to prevent long load hangs, r=dragana 2018-05-30 17:31:09 +03:00
Andi-Bogdan Postelnicu
3f2298c2f6 Bug 1457411 - Update netwerk module to make use of newer methods introduced with c++11 and c++14. r=valentin
MozReview-Commit-ID: 666LNaHyiuQ

--HG--
extra : rebase_source : f3a24e0342d8dcdf9020dd473bc6b1045cbc533b
2018-04-30 19:46:04 +03:00
Honza Bambas
f5cc301b66 Bug 1446117 - Make sure we also mark timeout epoch on a network socket when we are polling it for read/write, fix regression from bug 1444160. r=valentin 2018-03-19 07:48:00 -04:00
Honza Bambas
ea33c31195 Bug 1444160 - Fix calculation of network socket timeout logic. r=valentin, mayhemer 2018-03-12 07:00:00 +02:00
Dragana Damjanovic
3de66b952d Bug 1404069 - Revert bug 1363372. r=mayhemer 2017-11-27 21:12:31 +01: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
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
Sylvestre Ledru
4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Bill McCloskey
226f6b9185 Bug 1366869 - Make DISPATCH_NORMAL be the default flags argument for nsIEventTarget::Dispatch (r=froydnj)
MozReview-Commit-ID: 5DVcIaMHH95
2017-05-23 12:05:43 -07:00
Nathan Froyd
042857aede Bug 1360236 - make gSocketThread an internal implementation detail of nsSocketTransportService; r=mcmanus
This change makes the code a little cleaner and reduces the number of
places we call PR_GetCurrentThread, which is important for Quantum DOM
scheduling work.

The conversion was largely automatic, via:

find netwerk/ -name \*.cpp | \
  xargs sed -i -e 's/MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread[^;]*/MOZ_ASSERT(OnSocketThread(), "not on socket thread")/'

and related invocations, with a few manual tweaks at the end.
2017-04-27 14:34:42 -04:00
Andrew Osmond
7c53a79c5a Bug 1275464 - Part 2. Move socket transport service thread shutdown to xpcom-shutdown-threads. r=dragana 2016-09-19 13:29:59 -04:00
Dragana Damjanovic
3432aadb24 Bug 1294032 - Fix poll hang - on shutdown hang in poll post event multiple times. r=mcmanus
--HG--
extra : rebase_source : 1d56be9b3d04bb3cf6fcb1151aa4e2cfc26ffeee
2016-09-13 04:43:00 -04:00
Ralph Giles
2635086221 Bug 1275744 - Reference MOZ_LOG in netwerk comments. r=erahm
NSPR_LOG_MODULES is deprecated.

Programs in the test directory still use PR_NewLogModule,
so NSPR_LOG_MODULES is accurate for them. Getting these
to link against libxul for LazyLogModule is still to do,
so leave those for now.

MozReview-Commit-ID: 3uMR3YPJyyi

--HG--
extra : rebase_source : a94c6392cb0de1b6d6324b192954f48f784e8cbe
2016-05-25 16:13:54 -07:00
Patrick McManus
636ad8d0dc Bug 1202468 - remove mPendingQ lock r=dragana 2016-05-23 12:20:58 -04:00
Patrick McManus
2cd574f25f Bug 1274376 - more mozilla::net namespaces r=dragana
--HG--
extra : rebase_source : 914d48f23a4a5db052a789b9e21c1ff922533d35
2016-05-18 22:02:57 -04:00
Patrick McManus
f3e258d25a Bug 1135104 - increase send window on modern windows r=dragana 2016-05-11 05:31:01 -04:00
Patrick McManus
f03b618067 Bug 1236969 - remove autodialer r=valentin 2016-02-19 14:33:59 -05:00
Patrick McManus
ea8cc58c8b Bug 1260218 - SocketTransportService socket expansion r=dragana 2016-03-23 20:44:28 -04:00
Patrick McManus
b76d381e0b Bug 698882 - mozilla::net::PollableEvent r=dragana r=mayhemer 2016-03-22 11:02:39 -04:00
Dragana Damjanovic
75726942c9 Bug 1257809 - "Improve telemetry for PR_Connect". r=mcmanus
--HG--
extra : rebase_source : 93d5de4062db70a9cf59045a7a42b9a8ed74e30a
2016-03-19 04:25:00 +01:00
Patrick McManus
78cb6a4c07 Bug 698882 - backout 34046c232ee1 r=backout 2016-03-23 13:06:02 -04:00
Patrick McManus
6f258a71a8 Bug 698882 - mozilla::net::PollableEvent r=dragana r=mayhemer 2016-03-22 11:02:39 -04:00
Phil Ringnalda
d171b7485c Back out changeset 06e41d2080a2 (bug 698882) for (at least) 10.6 leaks including PollableEvent
CLOSED TREE
2016-03-20 17:24:48 -07:00
Patrick McManus
2a402eafbc Bug 698882 - mozilla::net::PollableEvent r=dragana r=mayhemer 2016-02-11 15:00:22 -05:00
Patrick McManus
4033d4ec3c Bug 698882 - backout threadevent changes due to crashes with McAfee Firefox Hook r=backout 2016-02-21 17:41:21 -05:00
Patrick McManus
ab744ac5a1 Bug 698882 - mozilla::net::PollableEvent r=dragana r=mayhemer 2016-02-11 15:00:22 -05:00
Dragana Damjanovic
06c9cbac52 Bug 1240481 - Limit PR_Close calls during shutdown. r=mcmanus 2016-01-18 08:20:00 +01:00
Xidorn Quan
f569fa65f9 Bug 1238404 - Use 'using' directive instead of having separate Dispatch impl in subclasses of nsIEventTarget. r=froydnj
--HG--
extra : source : 76255b192a7d6dae74f19c68653537d5f8f39775
2016-01-12 15:18:47 +11:00
Nathan Froyd
0d181baf2d Bug 1219910 - make gSocketThread a relaxed atomic variable; r=mcmanus
Many places that (re-)declared gSocketThread already included
nsSocketTransportService2.h; we can delete the declaration for those
places.  For all the other places, we need to include
nsSocketTransportService2.h.
2015-11-06 12:00:37 -05:00
Patrick McManus
073d4a9803 bug 1219466 - convert netwerk to LazyLogModule r=valentin.gosu 2015-11-02 23:35:29 -05:00
Carsten "Tomcat" Book
cb10921e0d Backed out changeset 2a233dadfc49 (bug 1219910) for bustage on a CLOSED TREE
--HG--
extra : rebase_source : 9d089223ab201540ca0f1852188114c2d2a743bd
2015-10-30 16:09:19 +01:00
Nathan Froyd
a782e5c73e Bug 1219910 - make gSocketThread a relaxed atomic variable; r=mcmanus
All the places that (re-)declared gSocketThread already included
nsSocketTransportService2.h, so we can safely delete them.
2015-10-29 16:47:23 -04:00
Nathan Froyd
c6238d0d96 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
Dragana Damjanovic
b77e0cb62b Bug 1204529 - mMaxTimePerPollIter should be atomic. r=mcmanus 2015-09-16 10:23:00 +02:00
Dragana Damjanovic
09970df1f7 Bug 1204043 - remove mServeMultipleEventsPerPollIter pref. r=mcmanus 2015-09-15 05:10:00 +02:00
Nathan Froyd
fd7eb3b17b Bug 1204042 - make nsSocketTransportService::mTelemetryEnabledPref an atomic variable; r=mcmanus
This variable is written on the main thread (where we can access prefs),
but read on the socket thread on every poll iteration to decide whether
we should record telemetry information.  Making it atomic communicates
our intent to read/write the value on multiple threads without any
locking.  Using relaxed memory consistency is just as efficient as what
we have today, and it does not seem terribly crucial whether the *very
next* poll iteration records telemetry once the pref is updated, or
whether we can eventually get the correct value on the socket thread.
2015-09-11 21:03:53 -04:00