Commit Graph

141 Commits

Author SHA1 Message Date
Tim Huang
4b7b20f7fd Bug 1337893 - Part 2: Making the DNS cache be aware of originAttributes. r=valentin
MozReview-Commit-ID: EroJiwwkGHa
2017-02-14 12:25:35 +08:00
Ehsan Akhgari
4be4db0aa8 Bug 1128311 - Only flush the DNS cache when the last private browsing window is closed; r=mcmanus 2017-01-03 14:32:49 -05:00
Andi-Bogdan Postelnicu
e5ba38c49a Bug 1311669 - Use C++11's override and remove virtual where applicable. r=valentin
MozReview-Commit-ID: Ab5BC8NhbIO
2016-11-08 16:36:58 +02:00
Andi-Bogdan Postelnicu
15794c143e Bug 1311669 - replace default bodies of special member functions with = default; r=valentin
MozReview-Commit-ID: YxHWVHUyDq
2016-11-01 14:44:09 +02:00
Andi-Bogdan Postelnicu
c2eea2fd98 Bug 1311669 - use auto type specifier for variable declarations to improve code readability and maintainability. r=valentin
MozReview-Commit-ID: F5YO9pVK5O8
2016-11-01 14:44:09 +02:00
Valentin Gosu
456aa2ab22 Bug 1301069 - Backed out bug 1185120 (changeset 38cad72a77a6) a=backout a=merge 2016-09-08 00:04:07 +02:00
Yen Chi Hsuan
1417a6989c Bug 1185120 - Convert raw pointers in DNS.cpp and nsHostResolver.cpp to smart pointers. r=valentin 2016-09-05 03:47:58 +08:00
Nicholas Nethercote
1009bf0056 Bug 1297658 - Avoid unnecessary checking in memory reporters. r=erahm.
This patch removes checking of all the callback calls in memory reporter
CollectReport() functions, because it's not useful.

The patch also does some associated clean-up.

- Replaces some uses of nsIMemoryReporterCallback with the preferred
  nsIHandleReportCallback typedef.

- Replaces aCallback/aCb/aClosure with aHandleRepor/aData for CollectReports()
  parameter names, for consistency.

- Adds MOZ_MUST_USE/[must_use] in a few places in nsIMemoryReporter.idl.

- Uses the MOZ_COLLECT_REPORT macro in all suitable places.

Overall the patch reduces code size by ~300 lines and reduces the size of
libxul by about 37 KiB on my Linux64 builds.
2016-08-24 15:23:45 +10:00
Michal Novotny
8eca8a1362 Bug 1286621 - Private browsing mode leaks info to about:networking, r=valentin 2016-08-17 03:10:28 +02:00
Nicholas Nethercote
1f65390cc9 Bug 1293603 (part 2) - Make Run() declarations consistent. r=erahm.
This patch makes most Run() declarations in subclasses of nsIRunnable have the
same form: |NS_IMETHOD Run() override|.

As a result of these changes, I had to add |override| to a couple of other
functions to satisfy clang's -Winconsistent-missing-override warning.
2016-08-08 12:18:10 +10:00
Patrick McManus
66901a1e5b Bug 1274605 dont update dns generations on validated renewals r=dragana 2016-07-07 21:04:36 -04:00
Nicholas Nethercote
d8859c104b Bug 1266632 - Add a null check in nsHostResolver::SizeOfIncludingThis. r=sworkman.
MozReview-Commit-ID: EpBxcIGyq2z
2016-04-22 14:04:58 +10:00
Kyle Huey
a9cf047227 Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj 2016-04-25 17:23:21 -07:00
Eric Rahm
a166a3c211 Bug 1251493 - Remove remaining references to MOZILLA_XPCOMRT_API from netwerk. r=mcmanus 2016-02-29 11:16:30 -08:00
Kershaw Chang
e59cb61044 Bug 1239955 - Let DNSService rely on IOService::Offline, r=bagder 2016-02-17 22:29:00 +01:00
Andrea Marchesini
35d4d535a5 Bug 1231378 - part 4 - Fix uninitialized members of classes in netwerk/widget/storage/uriloader/memory/tools, r=smaug 2016-01-12 18:16:59 +00:00
Carsten "Tomcat" Book
5d8570c820 Backed out changeset d6b0ffe1a7b3 (bug 1231378) 2016-01-12 15:48:54 +01:00
Andrea Marchesini
6832bea360 Bug 1231378 - part 4 - Fix uninitialized members of classes in netwerk/widget/storage/uriloader/memory/tools, r=smaug 2016-01-12 13:57:37 +00:00
Patrick McManus
6a2b5cca05 Bug 1228457 create pref to allow blocking .onion at dns level rfc 7687 r=valentin.gosu 2015-12-11 14:28:21 -05:00
Patrick McManus
b9a7eceb8d Bug 1228457 - backout 625248e1115c broke e10s xpcshell test CLOSED TREE r=backout 2015-12-09 13:12:19 -05:00
Patrick McManus
9a008afa39 Bug 1228457 create pref to allow blocking .onion at dns level rfc 7687 r=valentin.gosu 2015-12-04 06:20:15 -05:00
Nicholas Nethercote
262f17feb6 Bug 1229458 - Remove SizeOfIncludingThisMustBeUnshared() from string classes. r=mccr8.
The patch changes all uses of SizeOfIncludingThisMustBeUnshared() to
SizeOfIncludingThisIfUnshared(). This incurs the (tiny) cost of an unnecessary
IsReadonly() check for guaranteed-unshared strings, but avoids the possible
assertion failures that would occur when MustBeUnshared() was used incorrectly
on shared strings, which is an easy mistake to make.
2015-12-01 15:36:26 -08:00
Nathan Froyd
4e6d8f6705 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi
2015-10-18 01:24:48 -04:00
Ehsan Akhgari
1cdbf0b988 Bug 1185515 - Don't hold the observer service alive from nsDNSService; r=mcmanus 2015-07-20 17:51:33 -04:00
Honza Bambas
1dc83b6242 Bug 1170534 - Remove Visual Event Tracer. r=dougt 2015-06-02 11:44:00 -04:00
Patrick McManus
658aa608ac Bug 1161558 cleanup some nsIObserver shutdown paths r=bagder 2015-05-05 10:04:34 -04:00
Randall Barker
6ec55dcffd Bug 1097804 - Part 1 - Create a library containing nsISocketTransportService and nsIDNS that can be used to support standalone WebRTC. r=mcmanus 2015-04-03 15:54:00 +02:00
Wes Kocher
0018d4938d Backed out changeset e1f294f7ca90 (bug 1097804) 2015-04-02 13:42:33 -07:00
Randall Barker
41cbee3921 Bug 1097804 - Part 1, Create a library containing nsISocketTransportService and nsIDNS that can be used to support standalone WebRTC r=mcmanus 2015-04-02 12:13:28 -07:00
Andrea Marchesini
ad97ae68b8 Bug 1148527 - Indentation fix after bug 1145631, r=ehsan 2015-03-27 18:52:19 +00:00
Ehsan Akhgari
ea41d8de48 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Daniel Stenberg
4672ed722a Bug 1141741 - Make mDisablePrefetch assigns atomic; r=mcmanus 2015-03-11 13:58:29 +01:00
Daniel Stenberg
a2d7342cfe Bug 1140284 - start the resolver even when offline; r=ehsan 2015-03-09 09:52:05 +01:00
Nathan Froyd
c3c6b1facf Bug 1141689 - use services::GetObserverService more; r=ehsan 2014-04-29 13:31:06 -04:00
Patrick McManus
99d277cc07 Bug 967792 - Make localhost resolve offline. r=dragana 2015-02-25 14:02:38 -05:00
Ryan VanderMeulen
ea025ce7c0 Backed out changeset 13d9a5e39eb3 (bug 967792) for Gaia unit test failures. 2015-02-25 11:39:14 -05:00
Patrick McManus
e6f741f607 bug 967792 - make localhost resolve offline r=dragana 2015-02-15 13:50:48 -05:00
Henry Hu
94192ef238 Bug 1132358 - Save and restore mIterGenCnt. Keep it consistent with mIter. r=mcmanus
CLOSED TREE
2015-02-20 15:13:39 -05:00
Dragana Damjanovic
eb0b6322ab Bug 1108957 - Add per network interface dns query. This is possible only with gonk. r=mayhemer 2015-02-19 00:14:00 -05:00
Carsten "Tomcat" Book
8e80528310 Backed out changeset d168a14d3f71 (bug 967792) for suspicion of causing OS X xpcshell test failures on a CLOSED TREE 2015-02-17 09:48:33 +01:00
Patrick McManus
3c0c11f4a3 bug 967792 - make localhost resolve offline r=dragana 2015-02-15 13:50:48 -05:00
Patrick McManus
df36c63e19 bug 1129571 - h2/spdy coalsescing by full DNS rrset r=hurley 2015-01-30 10:55:07 -05:00
Ehsan Akhgari
7943855e34 Bug 1117042 - Mark virtual overridden functions as MOZ_OVERRIDE in netwerk; r=mcmanus 2015-01-02 09:04:04 -05:00
Neil Rashbrook
c106dc8b6a Bug 1078026 Clean up XPCOM string usage r=sworkman 2014-10-10 08:40:11 +01:00
James Willcox
fb7307a943 Bug 1024614 - Guard against null resolver when flushing DNS cache r=sworkman 2014-09-26 13:31:22 -05:00
Daniel Stenberg
af7be33d91 Bug 939318 - Detect network interface changes on Windows. r=mcmanus
Now supports IPv6 as well if a new enough windows version is used.
Which notification function to use is detect at run-time.

Now sends CHANGED event if the online interface(s) are different in any
way since it was previously checked and considered UP. CHANGED is sent
before UP in case both are detected. It does not send any CHANGED events
during the first 2 seconds after startup.

nIOService: split up the network event receiver function from the
network status init function and have the event receiver act on the
incoming event.

DNSservice: acts on network changes (flushes the host cache and restarts
ongoing name resolves)

HttpHandler: acts on network changes
2014-09-24 23:14:00 -04:00
Ed Morley
5eda4c7b7e Backed out changeset 89d06d103c10 (bug 939318) for Valgrind failures; CLOSED TREE 2014-09-24 16:17:57 +01:00
Daniel Stenberg
5844edb1f6 Bug 939318 - Detect network interface changes on windows. r=mcmanus
Now supports IPv6 as well if a new enough windows version is used.
Which notification function to use is detect at run-time.

Now sends CHANGED event if the online interface(s) are different in any
way since it was previously checked and considered UP. CHANGED is sent
before UP in case both are detected. It does not send any CHANGED events
during the first 2 seconds after startup.

nIOService: split up the network event receiver function from the
network status init function and have the event receiver act on the
incoming event.

DNSservice: acts on network changes (flushes the host cache and restarts
ongoing name resolves)

HttpHandler: acts on network changes
2014-09-23 03:48:00 -04:00
John Sullivan
dfa453019a Bug 1067679 - Call DnsQuery in addition to getaddrinfo to get DNS TTL on Windows r=sworkman 2014-09-20 15:10:18 -07:00
Ryan VanderMeulen
9f8dcf1f29 Backed out 7 changesets (bug 939318) for frequent Win7/Win8 xpcshell failures. a=backout
Backed out changeset 21dcd9e1b607 (bug 939318)
Backed out changeset cc131cf9ef81 (bug 939318)
Backed out changeset 02925699b9bb (bug 939318)
Backed out changeset a2d39ac660a6 (bug 939318)
Backed out changeset eeb8897aaa59 (bug 939318)
Backed out changeset d1e1ca369322 (bug 939318)
Backed out changeset 37bee525b188 (bug 939318)
2014-08-26 15:56:51 -04:00