Commit Graph

2097 Commits

Author SHA1 Message Date
Birunthan Mohanathas
94998cf5fe Bug 1219392 - Capitalize mozilla::unused to avoid conflicts. r=froydnj 2015-11-02 07:53:26 +02:00
Chris Peterson
e3e95816d8 Bug 1220035 - Fix -Wimplicit-fallthrough warnings in xpcom. r=mccr8
xpcom/base/nsDebugImpl.cpp:458:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
xpcom/ds/nsCheapSets.h:139:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
xpcom/ds/nsPersistentProperties.cpp:232:9 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
xpcom/ds/nsVariant.cpp:360:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
xpcom/ds/nsVariant.cpp:766:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
xpcom/ds/nsVariant.cpp:1658:9 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
xpcom/ds/nsVariant.cpp:1661:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
xpcom/glue/nsTextFormatter.cpp:355:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
xpcom/glue/nsTextFormatter.cpp:362:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
xpcom/io/nsWildCard.cpp:85:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
xpcom/io/nsWildCard.cpp:401:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
2015-10-29 21:31:32 -07:00
Ben Kelly
365ede2e20 Bug 1215140 P8 Remove now unnecessary interception values from ErrorList.h. r=bz 2015-10-29 19:53:25 -07:00
Makoto Kato
6195c1b293 Bug 1218315 - Use L"..." instead of MOZ_UTF16(...) for MSVS2015. r=nfroyd 2015-10-28 22:36:40 +09:00
Makoto Kato
c97296f857 Bug 1218315 - Replace NS_LITERAL_STRING(...).get() with MOZ_UTF16(...) on xpcom. r=nfroyd 2015-10-28 14:29:49 +09:00
Nathan Froyd
82f414d6ae Bug 1217940 - remove BindingUtils.h from CycleCollectedJSRuntime.cpp; r=mccr8 2015-10-23 14:01:02 -04:00
Cameron McCormack
fe6c39fd0e Bug 1208951 - Part 9: Implement KeyframeEffectReadOnly constructor. r=bzbarsky r=birtles 2015-10-22 19:22:38 +11:00
Eric Rahm
1e2da43ec5 Bug 1174785 - Part 1: Add LogModule, LogModuleManager, and LazyLogModule. r=froydnj
The logging interface is moved to xpcom/base, a LogModule wrapper for PR_Log is
added, a thread-safe LogModuleManager is added, and a LazyLogModule class used
to lazily load log modules in a thread-safe manner is added.
2015-10-19 12:22:11 -07:00
Eric Rahm
6e0cfa90a3 Bug 1215629 - Remove nsDebug logger. r=froydnj 2015-10-16 16:23:49 -07:00
Nathan Froyd
e4e2da55c9 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
Shih-Chiang Chien
68bd9e1465 Bug 1199592 - support TV device type in UA string. r=fabrice. 2015-10-05 19:58:00 +02:00
Eric Rahm
98d83a2260 Bug 1194555 - Part 6: Run reporters asynchronously. r=njn,jld,ted 2015-10-14 16:52:59 -07:00
Eric Rahm
df7e12abf2 Bug 1194555 - Part 5: Add option for async memory reporters. r=njn 2015-10-14 16:52:58 -07:00
Eric Rahm
f197465a62 Bug 1194555 - Part 4: Rename GetReportsState PendingProcessesState. r=njn 2015-10-14 16:52:57 -07:00
Eric Rahm
439b783afc Bug 1194555 - Part 3: Remove |getReportsForThisProcess| from the nsIMemoryReporterManager interface. r=njn
|getReportsForThisProcess| differs from |getReports| in that it is limited to current process and is synchronous. When asynchronous memory reporters are added the function will no longer be able tobe synchronous. There isn't much utility in only measuring the current process, so we can remove the function and switch existing users to |getReports|.
2015-10-14 16:52:55 -07:00
Eric Rahm
4e26695462 Bug 1194555 - Part 2: Remove |explicit| attribute from nsIMemoryReporterManager. r=njn
The calculation of |explicit| relies on the synchronous |getReportsForThisProcess|, once we have asynchronous reporters this will no longer work. As it is currently referenced in the about::memory tests we can just remove it.
2015-10-14 16:52:54 -07:00
Eric Rahm
f34a1d3ecf Bug 1194555 - Part 1: Remove RunReportersForThisProcess. r=njn
RunReportersForThisProcess is no longer used and will no longer work once we have async reporters.
2015-10-14 16:52:53 -07:00
Eric Rahm
4a1d48fd11 Bug 1194555 - Part 0: Cleanup GetReportsState constructor. r=njn
Move GetReportsState ctor to the impl so that mChildrenPending doesn't have
to be heap allocated.
2015-10-14 16:52:52 -07:00
Boris Zbarsky
01964bf2c2 Bug 1213289 part 3. Add a way to throw a DOMException with a custom message on ErrorResult. r=bkelly 2015-10-09 16:48:10 -04:00
Ehsan Akhgari
72f32cf977 Bug 1212636 - Add a better error message for the content corrupcted error caused by the Promise being passed to FetchEvent.respondWith; r=bkelly 2015-10-07 18:06:26 -04:00
Wes Kocher
46d77c938b Backed out 7 changesets (bug 1194555) for xpcshell failures
Backed out changeset e77be333f4fb (bug 1194555)
Backed out changeset 11951462a37c (bug 1194555)
Backed out changeset 99b27aa952c5 (bug 1194555)
Backed out changeset 70a8ed3b6a45 (bug 1194555)
Backed out changeset 748bfebe81e7 (bug 1194555)
Backed out changeset cbaac05a2934 (bug 1194555)
Backed out changeset fcbfd1379fcd (bug 1194555)
2015-10-06 14:40:51 -07:00
Eric Rahm
39abe4a6a8 Bug 1194555 - Part 6: Run reporters asynchronously. r=njn,jld 2015-10-06 11:23:36 -07:00
Eric Rahm
0534f0d706 Bug 1194555 - Part 5: Add option for async memory reporters. r=njn 2015-10-06 11:23:35 -07:00
Eric Rahm
d7cc3b6681 Bug 1194555 - Part 4: Rename GetReportsState PendingProcessesState. r=njn 2015-10-06 11:23:34 -07:00
Eric Rahm
ceea29572f Bug 1194555 - Part 3: Remove |getReportsForThisProcess| from the nsIMemoryReporterManager interface. r=njn
|getReportsForThisProcess| differs from |getReports| in that it is limited to current process and is synchronous. When asynchronous memory reporters are added the function will no longer be able tobe synchronous. There isn't much utility in only measuring the current process, so we can remove the function and switch existing users to |getReports|.
2015-10-06 11:23:33 -07:00
Eric Rahm
256c84c716 Bug 1194555 - Part 2: Remove |explicit| attribute from nsIMemoryReporterManager. r=njn
The calculation of |explicit| relies on the synchronous |getReportsForThisProcess|, once we have asynchronous reporters this will no longer work. As it is currently referenced in the about::memory tests we can just remove it.
2015-10-06 11:23:32 -07:00
Eric Rahm
9c48c1943f Bug 1194555 - Part 1: Remove RunReportersForThisProcess. r=njn
RunReportersForThisProcess is no longer used and will no longer work once we have async reporters.
2015-10-06 11:23:31 -07:00
Eric Rahm
f15f25613c Bug 1194555 - Part 0: Cleanup GetReportsState constructor. r=njn
Move GetReportsState ctor to the impl so that mChildrenPending doesn't have
to be heap allocated.
2015-10-06 11:23:30 -07:00
Andrew McCreight
6eaa0b8f47 Bug 1207368 - Use swap() instead of forget() to remove MessageElement::mMessage. r=froydnj
Using forget() to extract mMessage from MessageElement ends up going
from nsCOMPtr<T> to already_AddRefed<T> to nsCOMPtr<T>. For the second
step, the compiler can't tell that the already_AddRefed<T> came from a
canonical nsCOMPtr, so it calls Assert_NoQueryNeeded() in debug
builds. This in turn causes a QI, which does an AddRef. That is bad
because we're not on the main thread, and mMessage is
main-thread-only, so we get an assertion.

This patch works around that by using swap directly between two
nsCOMPtr<>, which avoids the Assert_NoQueryNeeded().

I called the method "swapMessage" rather than "swap" to emphasize that
we are not swapping the whole MessageElement, but just one part of
it. I find the existing forget() name to be confusing.
2015-10-02 14:47:13 -07:00
Andrew McCreight
d5b6afa430 Bug 1208157, part 2 - Make the fields of nsCycleCollector private. r=smaug
These are accidentally exposed by the NS_DECL.
2015-09-25 10:43:21 -07:00
Andrew McCreight
8b9798d4f9 Bug 1208157, part 1 - Add and use nsCycleCollector::IsIdle() predicate. r=smaug 2015-09-25 10:43:21 -07:00
Andrew McCreight
af10a6cc27 Bug 1202670 - Move most of nsCycleCollector::RemoveObjectFromGraph into CCGraph. r=smaug 2015-09-25 10:43:21 -07:00
Mike Hommey
3ef8be4fa4 Bug 1203840 - Trigger dirty pages purge after CC. r=njn,r=smaug,r=mccr8
Jemalloc 4 purges dirty pages regularly during free() when the ratio of dirty
pages compared to active pages is higher than 1 << lg_dirty_mult.  We set
lg_dirty_mult in jemalloc_config to limit RSS usage, but it also has an impact
on performance.

So instead of enforcing a high ratio to force more pages being purged, we keep
jemalloc's default ratio of 8, and force a regular purge of all dirty pages,
after cycle collection.

Keeping jemalloc's default ratio avoids cycle-collection-triggered purge to
have to go through really all dirty pages when there are a lot, in which case
the normal jemalloc purge during free() will already have kicked in. It also
takes care of everything that doesn't run the cycle collector still having
a level of purge, like plugins in the plugin-container.

At the same time, since jemalloc_purge_freed_pages does nothing with jemalloc 4,
repurpose the MEMORY_FREE_PURGED_PAGES_MS telemetry probe to track the time
spent in this cycle-collector-triggered purge.
2015-09-20 17:43:43 +09:00
Peter Van der Beken
58449c1f88 Fix for bug 527558 (Crash [@ xul.dll\!nsDependentCSubstring::nsDependentCSubstring]). r=sicking. 2009-11-15 14:50:09 +01:00
Andrew McCreight
c5010594cf Bug 1205348 - Always do shutdown CCs when NS_FREE_PERMANENT_DATA is defined. r=smaug 2015-09-16 10:10:00 +02:00
Chris Peterson
bcf08cea4c Bug 1204403 - Fix -Wshadow warnings in xpcom. r=mccr8 2015-09-07 23:56:16 -07: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
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
Ehsan Akhgari
6e42b2c32e Bug 1196430 follow-up: Hide the usage of gCodeAddressService behind #ifdef MOZ_STACKWALKING
This is needed to fix the build bustage on B2G Desktop Windows.
Landed on a CLOSED TREE
2015-09-11 00:06:40 -04:00
Nathan Froyd
68c76ca736 Bug 1196430 - part 8 - use less reinterpret_cast in nsTraceRefcnt.cpp; r=mccr8 2015-08-26 22:57:32 -04:00
Nathan Froyd
3f38bd6581 Bug 1196430 - part 5 - dump allocation stacks for leaked objects in XPCOM_MEM_LOG_CLASSES; r=mccr8 2015-08-26 19:10:22 -04:00
Nathan Froyd
101eaf807e Bug 1196430 - part 4 - record allocation stacks for classes in XPCOM_MEM_LOG_CLASSES; r=mccr8 2015-08-26 18:47:03 -04:00
Nathan Froyd
f2ae7da290 Bug 1196430 - part 3 - remove unnecessary nsString.h include from nsTraceRefcnt.cpp; r=mccr8 2015-08-26 18:28:35 -04:00
Nathan Froyd
482b59a8ad Bug 1196430 - part 2 - give SerialNumberRecord a proper constructor; r=mccr8
Using C++ style is so much nicer for these sorts of things.  This change
also paves the way for easily using non-POD things in SerialNumberRecord.
2015-08-26 18:25:35 -04:00
Nathan Froyd
904832b598 Bug 1196430 - part 1 - rename serialNumberRecord to SerialNumberRecord; r=mccr8
This is a small cleanup to make the class name conform to coding standards.
2015-08-26 18:24:13 -04:00
Nikhil Marathe
56a9c419d8 Bug 1198230 - Respect FetchEvent.preventDefault(). r=jdm
Update web-platform-tests expected data
2015-09-04 12:00:24 -07:00
Nicholas Nethercote
2ada216e0f Bug 1202526 (part 8) - Use PLDHashTable::RemoveEntry() in the cycle collector. r=mccr8.
This avoids repeating the hash table search in order to remove a CC graph
entry, which is good because it's a common operation.
2015-09-07 21:15:32 -07:00
Milan Sreckovic
a5220a4dc1 Bug 1128472 - Part 3. Vendor string on windows. r=aklotz 2015-09-03 13:10:00 +02:00
Milan Sreckovic
8126e87d73 Bug 1128472 - Part 2. Linux support. r=gfritzsche 2015-09-08 14:35:00 +02:00