Commit Graph

2669 Commits

Author SHA1 Message Date
Nicholas Nethercote
819433bae0 Bug 1299389 - Replace some raw pointers in nsThreadManager. r=froydnj.
nsThreadManager::get() can return a reference. This lets us remove some
redundant assertions.

nsThreadArray elements can be NotNull<>s.

--HG--
extra : rebase_source : fd49010167101bc15f7f6d01bf95fd63b81d60fb
2016-06-10 16:04:49 +10:00
Honza Bambas
e4eacf065d Bug 956338 - Add checks to WeakPtr/nsWeakReference and related classes to assert single-thread usage. r=nfroyd
--HG--
extra : rebase_source : 140fa149eb94f027e9319a44be0bbee34648222a
2016-08-01 13:16:16 +02:00
Gerald Squelart
fb84b054bc Bug 1295763 - Allow ThreadSafeAutoRefCnt with XPCOM_GLUE - r=froydnj
Removed '#ifndef XPCOM_GLUE' that blocked usage of thread-safe ref-counting
from XPCOM_GLUE code.

MozReview-Commit-ID: Hm0rdTKK46l

--HG--
extra : rebase_source : cd2779d0b39c5319cfdb5d12e8f4ac6f38945e7b
2016-08-16 14:07:16 +10:00
Kan-Ru Chen
b6d880aca1 Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj
The patch is generated from following command:

  rgrep -l unused.h|xargs sed -i -e s,mozilla/unused.h,mozilla/Unused.h,

MozReview-Commit-ID: AtLcWApZfES


--HG--
rename : mfbt/unused.h => mfbt/Unused.h
2016-08-24 14:47:04 +08:00
Andrew McCreight
edbb47a7d7 Bug 1288870, part 1 - Add NS_INLINE_DECL_REFCOUNTING_WITH_DESTROY. r=froydnj
This is the same basic idea as NS_IMPL_RELEASE_WITH_DESTROY. I need
this because I am making XPCNativeInterface refcounted, and it uses
some weird placement new stuff requiring a special function to
deallocate the object. (It does this to store an array of arbitrary
length inline, presumably for some sort of time or space reason.)

MozReview-Commit-ID: 5I7BgY6YlLl
2016-08-23 05:59:56 -07:00
Xidorn Quan
fab96c1410 Bug 1291707 part 2 - Add GetAndRemove to nsDataHashtable. r=froydnj
MozReview-Commit-ID: 24zlYwsRGsF

--HG--
extra : rebase_source : 904c62cd779133666904d3167cb7e7c31f95a412
extra : source : 6c1df15aad607e70547b51011bd352d8a8bf826d
2016-08-23 10:31:26 +10:00
Kan-Ru Chen
b4cf4bec61 Bug 1264642 - Part 6. Mark JSStructuredCloneData as MOZ_NON_MEMMOVABLE and add specializations in nsTArray.h. r=froydnj
MozReview-Commit-ID: HltgzBnxMsn
2016-08-23 00:40:47 +08:00
Nathan Froyd
e255fd3842 Bug 1262826 - specialize nsTHashtable<nsPtrHashKey<T>> to share a common implementation; r=erahm
We have a number of nsTHashtable<nsPtrHashKey<T>> instantiations, mostly
from IPDL-generated code.  There's no reason in principle that all of
these instantiations couldn't share code, since they're all storing POD
entries of the same size.  Let's specialize nsTHashtable for such types,
providing a thin layer over a hashtable that stores void pointers.  This
change saves about 90K of space (!) on x86-64 Linux.
2016-08-22 18:45:47 -04:00
Nathan Froyd
41ba39b3b0 Bug 1295197 - use non-null-checked operator new in xpcom/; r=erahm
The standard placement new function is declared to not throw, which
means that, per spec, a null check on its result is required. There are
a number of places throughout xpcom/ where we know that we are passing
non-null pointers to placement new (and receiving them as a return
value), and we are therefore doing useless work performing these null
checks.

Therefore, we should be using an operator new overload that doesn't
require the null check. MFBT has just such an overload, so use that.
2016-08-22 18:40:10 -04:00
Emilio Cobos Álvarez
00ab304ee2 Bug 1292618: Add Gecko_ClearPODTArray to clear arrays of types without destructors. r=heycam
MozReview-Commit-ID: 3RRvrXn6ZTD
Signed-off-by: Emilio Cobos Álvarez <ecoal95@gmail.com>
2016-08-19 20:24:24 -07:00
Wes Kocher
02f300c352 Backed out 4 changesets (bug 1292618) because it was making merging things difficult a=backout
Backed out changeset 14733a383b4c (bug 1292618)
Backed out changeset 17dfe8bc5f76 (bug 1292618)
Backed out changeset d04597bd1109 (bug 1292618)
Backed out changeset 30f7696fea2d (bug 1292618)
2016-08-19 18:37:09 -07:00
Emilio Cobos Álvarez
c043a5d5c5 Bug 1292618: Add Gecko_ClearPODTArray to clear arrays of types without destructors. r=heycam
MozReview-Commit-ID: 3RRvrXn6ZTD
Signed-off-by: Emilio Cobos Álvarez <ecoal95@gmail.com>
2016-08-19 18:26:35 -07:00
Ryan VanderMeulen
01c4e8cc1b Merge inbound to m-c. a=merge 2016-08-19 09:52:53 -04:00
Phil Ringnalda
b4f23026ee Backed out 5 changesets (bug 1292618) for !mImageTracked assertion failures
CLOSED TREE

Backed out changeset 1d767147e160 (bug 1292618)
Backed out changeset e6034e58efe4 (bug 1292618)
Backed out changeset 928dd363efa0 (bug 1292618)
Backed out changeset 8e274c66ae7f (bug 1292618)
Backed out changeset 6c347701d343 (bug 1292618)
2016-08-19 00:23:42 -07:00
Emilio Cobos Álvarez
242a6e6bcf Bug 1292618: Add Gecko_ClearPODTArray to clear arrays of types without destructors. r=heycam
MozReview-Commit-ID: 3RRvrXn6ZTD
2016-08-18 22:16:16 -07:00
Wes Kocher
55897634c1 Backed out 3 changesets (bug 1288870) for hazards a=backout
Backed out changeset 83bbd356da97 (bug 1288870)
Backed out changeset 4f0ab1a0d8dd (bug 1288870)
Backed out changeset 8d71aba5c1e7 (bug 1288870)
2016-08-18 16:50:13 -07:00
Andrew McCreight
f68a2b0443 Bug 1288870, part 1 - Add NS_INLINE_DECL_REFCOUNTING_WITH_DESTROY. r=froydnj
This is the same basic idea as NS_IMPL_RELEASE_WITH_DESTROY. I need
this because I am making XPCNativeInterface refcounted, and it uses
some weird placement new stuff requiring a special function to
deallocate the object. (It does this to store an array of arbitrary
length inline, presumably for some sort of time or space reason.)

MozReview-Commit-ID: 5I7BgY6YlLl
2016-08-18 15:20:48 -07:00
Emilio Cobos Álvarez
11d1b4e283 Bug 1295818: Templatize nsTArray::RemoveElementsBy to avoid a spurious allocation. r=froydnj
mozilla::function involves an allocation of the FunctionImpl type, that we can
avoid rather easily in this case.

This commit is completely optional, I guess, though the code we're using
RemoveElementsBy with the previous patch is sort of hot.

MozReview-Commit-ID: 2LoQs4cB28X
2016-08-18 10:02:39 -07:00
Sylvestre Ledru
4a4e53fe19 Bug 1296231 - Fix some missing "Missing varargs cleanup" and "Resource leaks" r=froydnj
MozReview-Commit-ID: AT1L351PjF6

--HG--
extra : rebase_source : f9c0cb1a8b478c2ad5a52f679eb5feb603e85d2e
2016-08-18 10:46:05 +02:00
Nicholas Nethercote
e0229c761e Bug 1295053 (part 5) - Remove an unnecessary use of NS_CALLBACK in ClassInfoData. r=froydnj.
--HG--
extra : rebase_source : 6b14b91e8cd4c056e40148064b396a55c6f451a3
2016-08-16 07:56:26 +10:00
Nicholas Nethercote
060123c88a Bug 1295053 (part 1) - Don't use NS_METHOD for xpcom thread utility functions. r=froydnj.
These don't need __stdcall on Win32.

--HG--
extra : rebase_source : 9af47c64571a2c7459f95c46e737c5ef50d47909
2016-08-15 14:29:43 +10:00
Wes Kocher
f378fa54b1 Backed out changeset f8d33a975228 (bug 1295197) for being a possible cause of crashtest assertions CLOSED TREE 2016-08-16 11:22:23 -07:00
Nathan Froyd
da3e07b555 Bug 1295197 - use non-null-checked operator new in xpcom/; r=erahm
The standard placement new function is declared to not throw, which
means that, per spec, a null check on its result is required.  There are
a number of places throughout xpcom/ where we know that we are passing
non-null pointers to placement new (and receiving them as a return
value), and we are therefore doing useless work performing these null
checks.

Therefore, we should be using an operator new overload that doesn't
require the null check.  MFBT has just such an overload, so use that.
2016-08-16 17:05:39 -04:00
Michael Layzell
e1fc3b1773 Bug 1159244 - Add release mode bounds checking with custom annotations to nsTArray, r=froydnj
MozReview-Commit-ID: Ljx9PwBCyTT
2016-08-15 13:29:45 -04:00
Igor
175543fda8 Bug 1293384 - Part 2: Rename Snprintf.h header to Sprintf.h. r=froydnj 2016-08-14 23:43:21 -07:00
Igor
a57972337d Bug 1293384 - Part 1: Rename snprintf_literal to SprintfLiteral. r=froydnj 2016-08-14 23:44:00 -07:00
Wes Kocher
e9097643d5 Merge inbound to central, a=merge 2016-08-12 13:44:29 -07:00
Jan de Mooij
0ad12515f4 Bug 1292892 part 1 - Stop using JSRuntime outside SpiderMonkey. r=bz,terrence,fitzgen,kanru 2016-08-11 14:39:22 +02:00
Nicholas Nethercote
e7f10a07fd 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.

--HG--
extra : rebase_source : 815d0018b0b13329bb5698c410f500dddcc3ee12
2016-08-08 12:18:10 +10:00
Andrew McCreight
18b7a1fc2f Bug 1293666 - Add initializer_list ctor to AutoTArray. r=froydnj
MozReview-Commit-ID: 8ORBttWN2Rj

--HG--
extra : rebase_source : 9ad6ae8aff9cbc81c773297d0bb2f7478fb3516e
2016-08-09 07:21:26 -07:00
Igor
4878f6bf37 Bug 1289890 - Change nsCOMArray::ReplaceObjectAt() return type from "bool" to "void", since it always succeeds. r=froyndnj 2016-08-02 16:20:00 +02:00
Chris Peterson
6ae2ecbc02 Backed out changeset 3b1cf7c28eb7 (bug 1290646) for possibly breaking OS X debug mochitests. 2016-08-03 01:11:06 -07:00
Chris Peterson
1eccabf8d3 Bug 1290646 - Remove VS2012 crash workaround in nsTArray. r=jimm 2016-07-28 11:51:25 -07:00
Cameron McCormack
e6a3498cde Bug 1288038 - Make fallible nsBaseHashtable::Put use fallible nsTHashtable::PutEntry. r=froydnj r=sfink
MozReview-Commit-ID: 8N32oU4V5zh
2016-08-03 09:18:35 +08:00
Carsten "Tomcat" Book
bd81ddd0b0 merge mozilla-inbound to mozilla-central a=merge 2016-08-02 17:09:31 +02:00
Andrew McCreight
e5fea6eaa1 Bug 1279998 - Remove NSCAP_FEATURE_TEST_NONNULL_QUERY_SUCCEEDS. r=froydnj
MozReview-Commit-ID: LbT6922qlHQ

--HG--
extra : rebase_source : f59298236c3905c4c92d261ffe93847584d24bb6
2016-08-01 11:16:19 -07:00
Emilio Cobos Álvarez
4d812b8ba1 Bug 1290524: Allow nsClassHashTable::LookupOrAdd to provide arguments to construct the new object.
MozReview-Commit-ID: 1s1ZaFWLrri
2016-07-30 15:03:11 -07:00
Xidorn Quan
5b8c16a02b Bug 1287706 part 5 - Add RemoveElementsBy method to nsTArray and nsTObserverArray to allow filtering elements by predicate function. r=froydnj
MozReview-Commit-ID: LjUXYsIuaFL

--HG--
extra : source : e0654f189aad7399dd69a920995e8b87f590da79
2016-07-28 12:00:06 +10:00
Seth Fowler
5748c4da8c Bug 1291019 - Take the value of |aDoomed| in NS_ReleaseOnMainThread() if we're going to leak anyway. r=froydnj 2016-08-01 17:51:01 -07:00
Emilio Cobos Álvarez
1a1438ccb5 Bug 1288578: Make public nsClassHashTable::IsEmpty. r=froydnj
MozReview-Commit-ID: JSjT17kWYcQ
2016-07-22 13:27:52 -07:00
Tom Tromey
5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06:00
Chris Peterson
d634a99cad Bug 1277106 - Part 4: Remove MOZ_UTF16() macro. r=Waldo 2016-07-19 21:07:53 -07:00
Chris Peterson
b175c9fdd5 Bug 1277106 - Part 2: Expand MOZ_UTF16() strings to u"" string literals. r=Waldo 2016-07-20 22:03:25 -07:00
Thomas Zimmermann
16e1b1c5eb Bug 1288077: Merge implementations of |nsTArrayFallibleAllocator|, r=froydnj
The two implemenations of |nsTArrayFallibleAllocator| in 'nsTArray' are
equivalent. This patch merges both.

MozReview-Commit-ID: 3G9pHSQRzKz
2016-07-20 17:29:36 +02:00
Thomas Zimmermann
5528947546 Bug 1288077: Cleanup forward declarations of array types, r=froydnj
MozReview-Commit-ID: 59XzOnREb6I
2016-07-20 17:29:36 +02:00
Thomas Zimmermann
c9844397ea Bug 1288077: Whitespace fixes, r=froydnj
MozReview-Commit-ID: DpKAsid5O3k
2016-07-20 17:29:36 +02:00
Manish Goregaokar
4d3c9798eb Bug 1285235 - Add bindings for growing nsTArrays; r=bholley 2016-07-14 14:29:37 +05:30
Chris Peterson
43c2748f66 Bug 1277775 - Replace MOZ_CONSTEXPR{_VAR,_TMPL} with constexpr. r=froydnj 2016-07-08 14:39:53 -07:00
Nathan Froyd
5dba0130cc Bug 1271751 - part 8 - fix bug in nsTArray_CopyWithConstructors; r=erahm
The backwards copying case in MoveOverlappingRegion had a bug: rather
than destroying each element from the source range as we moved it, we
would always destroy the element at the beginning of the source range.
Fortunately, none of the existing types that were copied via
constructors seem to trigger the problematic code.
2016-07-08 16:59:04 -04:00
Nathan Froyd
229ede80e2 Bug 1271751 - part 7 - remove nsTArray_CopyWith*::Copy*; r=erahm
After all the previous patches, we never call these functions.  Any
copying required by nsTArray is taken care of by other means.
2016-07-08 16:59:05 -04:00
Nathan Froyd
3d1192cadc Bug 1271751 - part 6 - make ShiftData actually move its elements rather than copying; r=erahm
This change eliminates the last use of the Copy* family of functions.
2016-07-08 16:59:05 -04:00
Nathan Froyd
0dc761e84b Bug 1271751 - part 5 - use MoveNonOverlappingRegion instead of CopyNonOverlappingRegion; r=erahm
In all of the calls to CopyNonOverlappingRegion from within nsTArray, we
don't care about the contents of the source afterwards.  So we can use
moves instead of copies to potentially make things more efficient.
2016-07-08 16:59:05 -04:00
Nathan Froyd
315612a443 Bug 1271751 - part 4 - rename CopyNonOverlappingRegionWithHeader to MoveNonOverlappingRegionWithHeader; r=erahm
Whenever we're copying the header, we can be guaranteed that we're never
going to use the elements from the old array afterward, so can move (in
the C++ sense) the elements rather than copying them.
2016-07-08 16:59:05 -04:00
Nathan Froyd
5dd30fe964 Bug 1271751 - part 3 - add Move{Non,}OverlappingRegion; r=erahm
We'll need these for future patches as we transition nsTArray to use
moves for most of its operations rather than copies.  The implementation
of these functions are essentially cut-and-paste versions of the Copy*
functions, but using moves.
2016-07-08 16:59:05 -04:00
Nathan Froyd
6e9fa45637 Bug 1271751 - part 2 - rename {Copy,Move}Elements to something more accurate; r=erahm
The names {Copy,Move}Elements are based on the use of mem{cpy,move},
respectively.  However, I submit that we really want the names to
reflect the C++ operations being done, rather than the underlying
implementation details.  So let's rename these to reflect that we are
always copying the elements, and discriminate between the two cases
based on whether the regions being copied overlap or not.

Bring CopyHeaderAndElements along for the ride, as well.
2016-07-08 16:59:05 -04:00
Nathan Froyd
e458be747b Bug 1271751 - part 1 - provide out-of-class definitions for some nsTArray functions; r=erahm
This change enables some of the methods in nsTArray to be lazily
instantiated, particularly the ones that care about whether the element
type is copyable.  Since we have a number of places where nsTArray is
used with move-only types, we need to ensure that unless methods
requiring copyability are actually called, those methods are not
instantiated.
2016-07-08 16:59:05 -04:00
Nathan Froyd
09a852e8b4 Bug 1271751 - part 0 - remove heap functions from nsTArray; r=erahm
They are unused, except for tests.
2016-07-08 16:59:05 -04:00
Chris Peterson
2b3b60f7b1 Bug 1277155 - Part 1: Remove snprintf() polyfills for VS2013 in Sprintf.h and #defines. r=froydnj r=mhowell 2016-06-27 20:45:03 -07:00
Jan de Mooij
96da4695c8 Bug 1283855 part 25 - Make JS_GC take JSContext instead of JSRuntime. r=terrence 2016-07-06 11:40:20 +02:00
Andrew McCreight
d2ec8127e0 Bug 1279609 - nsRunnableMethodImpl should use a non-public destructor. r=froydnj 2016-07-05 12:03:18 -07:00
Jan de Mooij
4ba1239131 Bug 1283855 part 11 - Make some GC callback APIs take JSContext instead of JSRuntime. r=terrence,mccr8 2016-07-05 14:35:19 +02:00
Nathan Froyd
1363127e17 Bug 1283524 - remove unnecessary NS_ASSERT_OWNINGTHREAD checks in Release method macros; r=mccr8
The definitions of these Release methods already include
NS_ASSERT_OWNINGTHREAD checks earlier, so these second checks are
redundant.
2016-06-30 23:55:36 -04:00
Aidin Gharibnavaz
523608513b Bug 1247972 - specialize NS_ProxyRelease for nsISupports to be out-of-line; r=erahm
NS_ProxyRelease's current implementation requires a lot of code.  We can
reduce the impact of this by providing an out-of-line implementation for
classes based on nsISupports.  This change reduces codesize by ~60K on
a Linux x86-64 build.
2016-06-29 18:56:41 -04:00
Nathan Froyd
f7ee3c3dbf Bug 1281626 - part 5 - move nsRunnableFunction into mozilla::detail and rename it; r=khuey
We do this for similar reasons as nsRunnableMethod*: less prefixing and
a more obvious signal that this is a private implementation class.
2016-06-28 22:24:54 -04:00
Nathan Froyd
65715152b1 Bug 1281626 - part 4 - change NS_NewRunnableFunction to return already_AddRefed; r=khuey
This change makes it more consistent with NS_NewRunnableMethod and also
opens up optimization opportunities for later.
2016-06-28 22:24:54 -04:00
Nathan Froyd
f624e16333 Bug 1281626 - part 2 - make RunnableMethod* internals final classes; r=khuey
This step is mostly tidiness.
2016-06-28 22:24:54 -04:00
Nathan Froyd
bcf3920031 Bug 1281626 - part 1 - move nsRunnableMethod* into mozilla::detail and rename them; r=khuey
Less ns-prefixing is more better.  Also, this renaming makes clearer
that these classes are private implementation details, which is good,
because we're going to take advantage of that fact in a bit.
2016-06-28 22:24:54 -04:00
Kyle Huey
6baa905da7 Bug 1282527: Remove remaining PR_ASSERTs outside of NSPR/NSS. r=dbaron
--HG--
extra : rebase_source : a9dd69c772ef2641ee300d57d2a4d4c83003726c
2016-06-28 10:47:22 -07:00
Jan de Mooij
fb0436ba41 Bug 1279295 - Create the runtime's JSContext when we create the runtime. r=luke 2016-06-22 09:47:52 +02:00
Nathan Froyd
ddc458bf9e Bug 1281227 - clarify comments in PLDHashTable.cpp; r=njn
Comments for SearchTable and FindFreeEntry refer to parameters that no
longer exist, now that we do things with template arguments.  Let's fix
that.
2016-06-22 02:44:40 -04:00
Nathan Froyd
150bcb573b Bug 1278925 - micro-optimize nsCOMArray appending with already_AddRefed AppendElement; r=erahm
In all of the places touched by this patch, the smart pointer we're
appending is about to become unused, so simply .forget()'ing its
reference into the appropriate nsCOMArray works just fine.
2016-06-20 18:38:10 -04:00
Nomis101
083b9ba519 Bug 1279734 - "Fix two comment typos in nsTextFormatter.cpp". r=nfroyd 2016-06-11 10:41:45 +02:00
Gerald Squelart
e8513ef5ee Bug 1271593 - NS_NewRunnableFunction should forward its arg - r=froydnj
By perfect-forwarding its argument, we can automatically gain move semantics
optimization when storing the given function object into nsRunnableFunction.
Also it allows movable-only function objects.

Note that any reference is removed from the type to be stored, so that the
runnable always contain a concrete function object.

MozReview-Commit-ID: 9EZK84ZhMvR

--HG--
extra : rebase_source : e1f87c3284fda4df6d13839ea6a0b0c2ce196833
2016-06-02 01:21:36 +02:00
Nicholas Nethercote
829225e78d Bug 1278452 - Remove a redundant null check in xpcom/glue/. r=froydnj.
There's another null check just a little earlier.

--HG--
extra : rebase_source : 24968e6bc5f12c3aa5d53711ebbb7f849c4501c3
2016-06-07 16:13:17 +10:00
Nathan Froyd
2be85aa542 Bug 1277890 - part 0 - add "append already_AddRefed element" API to nsCOMArray; r=erahm 2016-06-07 04:10:25 -04:00
Jan de Mooij
b0f9749010 Bug 1278223 part 1 - Stop using multiple contexts per runtime in gtests. r=fitzgen 2016-06-06 19:45:06 +02:00
L. David Baron
fc6592bdbc Bug 1271182 - Add some deleted assignment operators and copy constructors. r=khuey
These are generally good practice for reference-counted objects; they
catch cases where these operations are used by accident, breaking
reference-counting.

This doesn't show any existing problems, though.

MozReview-Commit-ID: EvRkNCymOqT
2016-05-25 18:04:35 -07:00
Andrew McCreight
35eaf64b42 Bug 1273190, part 3 - Fix some modelines in xpcom/. r=froydnj
Autogenerated by modeline.py.
2016-05-24 14:45:44 -07:00
Andrew McCreight
21bb33df87 Bug 1273190, part 1 - Fix indentation and mode lines for various xpcom/ files. r=froydnj 2016-05-24 14:45:44 -07:00
Eric Rahm
3e3b6c7f4d Bug 1270938 - Add stack traces for blocking resource base warnings. r=froydnj 2016-05-23 14:59:30 -07:00
Cameron McCormack
2af45ab23d Bug 1273838 - Part 2: Add stylo bindings glue for refcounting nsIPrincipals and nsIURIs. r=bholley
--HG--
extra : rebase_source : 3feef1315c4c8716952f630a38a4802e118b44ed
2016-05-21 10:02:54 +10:00
Cameron McCormack
a5b7829d71 Bug 1273838 - Part 0.9: Add Ptr{Holder,Handle} typedefs for nsMainThreadPtr{Holder,Handle}. r=bholley
--HG--
extra : rebase_source : 12d60b4f31c3aa9183bcd8455357be4179f9a954
2016-05-21 10:02:54 +10:00
Cameron McCormack
e0b47504da Bug 1273838 - Part 0.8: Add nsMainThreadPtr{Handle,Holder} constructors that take already_AddRefed pointers. r=bholley
--HG--
extra : rebase_source : bbdd9945e4621a54510f0259fc01454cc8642b17
2016-05-21 10:02:54 +10:00
Ting-Yu Lin
316b3d93b6 Bug 1272831 - Add AutoRestore::SavedValue() to retrieve the saved value. r=froydnj
MozReview-Commit-ID: eZCWmTpvXi

--HG--
extra : rebase_source : fc43e8b43edaad362971e7c7f91895759f47bf8f
2016-05-14 09:47:14 +08:00
Bob Owen
e809e9f918 Bug 1035125 Part 9: Link Chromium sandbox into firefox.exe instead of having a separate DLL. r=aklotz,glandium
MozReview-Commit-ID: 1vgDPjpcwz3

--HG--
extra : rebase_source : 40966d98ca6c37f30884639d648907b4760ae240
2016-05-15 16:41:40 +01:00
Chris Peterson
8a9e2d2bd4 Bug 1272513 - Part 2: Remove redundant -Wshadow CXXFLAGS from moz.build files. r=glandium 2016-05-14 00:54:55 -07:00
Chris Peterson
353ee65255 Bug 1272513 - Part 1: Suppress -Wshadow warnings-as-errors in some directories. r=glandium 2016-05-11 00:00:01 -07:00
Andrew McCreight
1dc278fe13 Bug 1271848, part 1 - Add ClassName() method to the CC participant. r=smaug
This will let us report better information about participants at runtime.
2016-05-12 10:54:33 -07:00
Kyle Huey
941ab1f522 Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-05-05 01:45:00 -07:00
Kyle Huey
7c2af31504 Bug 1268313: Part 5 - Make NS_NewRunnableMethod able to call const functions. r=froydnj 2016-05-05 01:44:59 -07:00
Kyle Huey
156b8c1933 Bug 1268313: Part 4 - Replace NewCancelableRunnableMethod with NS_NewCancelableRunnableMethod. r=froydnj 2016-05-05 01:44:59 -07:00
Kyle Huey
7f54121b91 Bug 1268313: Part 3 - Replace some NewCancelableRunnableMethod with NS_NewNonOwningCancelableRunnableMethod. r=froydnj 2016-05-05 01:44:59 -07:00
Aryeh Gregor
32bf86a025 Bug 1193762 part 9 - Delete nsCOMPtr<T>::operator T*()&&; r=froydnj 2016-05-01 21:29:23 +03:00
Carsten "Tomcat" Book
5d43a44ec6 Backed out changeset 3f2f3fcac66b (bug 1268313)
--HG--
extra : rebase_source : 438e7d7077b900ef252bd628f4559424eebd211f
2016-04-29 14:21:23 +02:00
Carsten "Tomcat" Book
4bb6f48de3 Backed out changeset 6a8d57e8fa8e (bug 1268313)
--HG--
extra : rebase_source : 8690897fd41073f22c8b25db5e8ce88df76a2bb7
2016-04-29 14:21:22 +02:00
Carsten "Tomcat" Book
894326b653 Backed out changeset 726f7361e0b8 (bug 1268313)
--HG--
extra : rebase_source : 3e04a6751a1cce2be7692763b4520dcca053f210
2016-04-29 14:21:20 +02:00
Carsten "Tomcat" Book
ba3fe0975c Backed out changeset 85ce8cb0639a (bug 1268313)
--HG--
extra : rebase_source : 56d1cf41a2dc4959b67f834e07192a5c772176a8
2016-04-29 14:21:16 +02:00
Nicholas Nethercote
2511b2c327 Bug 1267550 (part 2) - Rename MOZ_WARN_UNUSED_RESULT as MOZ_MUST_USE. r=froydnj.
It's an annotation that is used a lot, and should be used even more, so a
shorter name is better.

MozReview-Commit-ID: 1VS4Dney4WX

--HG--
extra : rebase_source : b26919c1b0fcb32e5339adeef5be5becae6032cf
2016-04-27 14:16:50 +10:00
Kyle Huey
48a594a09e Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-04-28 14:08:25 -07:00
Kyle Huey
732a15e600 Bug 1268313: Part 5 - Make NS_NewRunnableMethod able to call const functions. r=froydnj 2016-04-28 14:08:24 -07:00
Kyle Huey
c724d0c867 Bug 1268313: Part 4 - Replace NewCancelableRunnableMethod with NS_NewCancelableRunnableMethod. r=froydnj 2016-04-28 14:08:24 -07:00
Kyle Huey
a13954d079 Bug 1268313: Part 3 - Replace some NewCancelableRunnableMethod with NS_NewNonOwningCancelableRunnableMethod. r=froydnj 2016-04-28 14:08:24 -07:00
Jean-Yves Avenard
b9ddae6e51 Bug 1264199: P0. Fix nsDequeue/MediaQueue methods constness. r=jwwang
MozReview-Commit-ID: BiOedq3IHt

--HG--
extra : rebase_source : 87175a92efdcfea864256482ced7eeee61301690
2016-04-25 12:13:55 +10:00
Kyle Huey
c73656947b Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj 2016-04-25 17:23:21 -07:00
Chris Peterson
c2fe3cc9ea Bug 1266295 - Remove unnecessary compiler version checks for gcc <= 4.8.0 in xpcom. r=froydnj 2016-04-17 17:10:00 -07:00
Andreas Pehrson
7386c22521 Bug 1262970 - Allow nsMainThreadPtrHandle to be constructed by and compared to nullptr. r=froydnj
MozReview-Commit-ID: HQgRhJc9AwG

--HG--
extra : rebase_source : e97c55229e0043d838d5dcb3e343bba2281c1e36
2016-04-14 11:38:04 +02:00
Nathan Froyd
b0e24f4d55 Bug 1262400 - remove outer pointers from nsCreateInstance* classes; r=erahm
Outer pointers for object aggregation never get used.  Having these
always-null pointers around means extra space to store them and extra
instructions to deal with them.  Let's just remove them.
2016-04-14 11:30:59 -04:00
Nicholas Nethercote
60dcde7875 Bug 1261723 (part 2) - Separate class ops from js::Class. code=njn,h4writer. r=efaust,bz.
js::Class op are often all null. And when they're not all null, they're often
duplicated among classes. By pulling them out into their own struct, and using a
(possibly null) pointer in js::Class, we can save 114 KiB per process on
64-bit, and half that on 32-bit.
* * *
imported patch separate-ClassOps-2

--HG--
extra : rebase_source : bd751bf247e9491c1966a123dbeffa573657dfb1
2016-04-01 11:00:01 +11:00
Kyle Huey
2709afd167 Bug 1263311: Part 3 - s/nsCancelableRunnable/CancelableRunnable/g. r=froydnj 2016-04-11 11:40:06 -07:00
Kyle Huey
1cc02aa8c6 Bug 1263311: Part 1 - Change the nsICancelableRunnable interface. r=froydnj 2016-04-11 11:40:06 -07:00
Jonathan Watt
2dbf3449f8 Bug 1263764 - Make the external string API's Truncate compatible with the internal API's Truncate. r=froydnj 2016-04-01 16:17:35 +01:00
Wes Kocher
7d2cebe912 Backed out 3 changesets (bug 1263311) for Windows build failures in ServiceWorkerPrivate.cpp CLOSED TREE
Backed out changeset 0434a548e1fe (bug 1263311)
Backed out changeset 60b1be29446c (bug 1263311)
Backed out changeset 18132498bc40 (bug 1263311)

MozReview-Commit-ID: LPEa05QobdQ
2016-04-11 12:50:56 -07:00
Kyle Huey
d200ed89d0 Bug 1263311: Part 3 - s/nsCancelableRunnable/CancelableRunnable/g. r=froydnj 2016-04-11 11:40:06 -07:00
Kyle Huey
f13a6fc866 Bug 1263311: Part 1 - Change the nsICancelableRunnable interface. r=froydnj 2016-04-11 11:40:06 -07:00
Botond Ballo
5a57a5b196 Bug 1163320 - Variadic implementation of nsRunnableMethodArguments. r=froydnj
MozReview-Commit-ID: 13YyOyiionD

--HG--
extra : rebase_source : 89a0ad0877ed3290a41288523fe9b13d9c5bac7d
extra : source : ed761807105b30069d5a7412f8dacf75429eeeb6
2015-05-11 17:24:21 -04:00
Andreas Pehrson
dfc6d94fe7 Bug 1208371 - Implement operator!= for nsMainThreadPtrHandle. r=bholley
MozReview-Commit-ID: EjlvLi9VsFA

--HG--
extra : rebase_source : 0e58b99b3c03a4abc4dfbcd57662f761f701615e
2016-02-04 00:24:52 +08:00
Jean-Yves Avenard
da166b0f2c Bug 1259706: Add NS_INLINE_DECL_THREADSAFE_VIRTUAL_REFCOUNTING macro. r=froydnj
Allow to generate virtual AddRef/Release methods.

MozReview-Commit-ID: I7xPupDEtr4

--HG--
extra : rebase_source : b4d0e2b2a254e0402bbe6543c5263da359efb640
2016-03-25 23:01:58 +11:00
Vladimir Vukicevic
6a82950698 Bug 1242963 - nsID stringification helper for logging; r=froydnj
From 6321c215bed173f89127558b2eec3cc1b475cf84 Mon Sep 17 00:00:00 2001

MozReview-Commit-ID: IPhQhW8v4iH

--HG--
extra : rebase_source : b78f75145aeff78901ffcea687c710d637f2c1e7
extra : source : defe17fe276a9a66f923f714d4f6c35e6373364e
2015-10-08 13:11:04 -04:00
Gregory Szorc
640bfbec0b Bug 1257331 - Use LPWSTR instead of LPVOID to prevent C4477 warning; r=froydnj
MozReview-Commit-ID: 2rJdKhlLtXr

--HG--
extra : rebase_source : e31284758a80054831fd6ecda0e7733ab4e9312a
2016-03-17 20:36:06 -07:00
Nicholas Nethercote
a2f068b2ad Bug 1253085 - Remove the |PLDHashTable*| argument from PLDHash{HashKey,MatchEntry}. r=froydnj.
This is easy because it's never needed.

--HG--
extra : rebase_source : 78830dab41c40a1544fa55fc69ca9c1c6709d767
2016-03-16 15:33:44 +11:00
Nicholas Nethercote
f584cb3bd0 Bug 1255655 - Const-ify named CIDs. r=froydnj.
There are about 600 of these, at 16 bytes each, and this change makes all of
them shareable between processes

--HG--
extra : rebase_source : b1824f0a022389aeb02d925c4d788e5a671bf782
2016-03-11 14:32:39 +11:00
Eric Rahm
4c23f5cd8d Bug 1251482 - Remove remaining references to MOZILLA_XPCOMRT_API from xpcom. r=froydnj 2016-02-26 18:10:56 -08:00
Wes Kocher
72d9604d91 Backed out 8 changesets (bug 1251482, bug 1251494, bug 1251473, bug 1239870) for gtest failures
Backed out changeset f064a5efbb8c (bug 1251494)
Backed out changeset 9e33adec1aa6 (bug 1251482)
Backed out changeset ab0347657e25 (bug 1251473)
Backed out changeset 1d385d4f195d (bug 1239870)
Backed out changeset ceb3e1ee7dda (bug 1239870)
Backed out changeset 8574075bf42f (bug 1239870)
Backed out changeset ba077a3afbc7 (bug 1239870)
Backed out changeset eb99ab06414d (bug 1239870)

MozReview-Commit-ID: 7r9SEk4VGNU
2016-02-26 17:14:57 -08:00
Eric Rahm
ae72b68e62 Bug 1251482 - Remove remaining references to MOZILLA_XPCOMRT_API from xpcom. r=froydnj 2016-02-26 15:31:19 -08:00
Andrew McCreight
b80e656e9e Bug 1247679, part 3 - Replace NS_IMPL_CYCLE_COLLECTION_TRACE_JSVAL_MEMBER_CALLBACK with JS_MEMBER. r=smaug 2016-02-22 10:11:02 -08:00
Andrew McCreight
c0010835a7 Bug 1247679, part 2 - Null check inside TraceCallbackFunc::Trace. r=smaug 2016-02-22 10:11:02 -08:00
Nicholas Nethercote
2abcf180f1 Bug 1249171 - Simplify nsCOMArray::SizeOfExcludingThis(). r=erahm.
Using explicit iteration at measurement sites is much simpler and nicer than
using callbacks.

--HG--
extra : rebase_source : 8b3f7aa702743b665383766b66a866a2c3d17240
2016-02-19 14:54:45 +11:00
Aidin Gharibnavaz
686438c658 Bug 1164581 - Adding an overload for NS_ProxyRelease that accepts already_AddRefed, and removing all the others. r=bobbyholley 2016-02-10 08:23:00 +01:00
Carsten "Tomcat" Book
5b358688b7 Backed out changeset c18e29c1b369 (bug 1164581) for cpp unit tests test failures
--HG--
extra : rebase_source : fb6fd434c8e3f4b5fa53ea645a54c07cab207894
2016-02-08 11:17:38 +01:00
Aidin Gharibnavaz
69cf7e035f Bug 1164581 - Adding an overload for NS_ProxyRelease that accepts already_AddRefed, and removing all the others. r=bobbyholley
--HG--
extra : rebase_source : 3c6bba6613a14e48239d302bdd0f7fe2e322265d
2016-02-07 10:56:00 +01:00
Nicholas Nethercote
5315826043 Bug 1181444 (part 2) - Remove nsBaseHashtable::Enumerate(). r=froydnj.
\o/

--HG--
extra : rebase_source : 4f4831b1feb4ee25b6adc7aeeae548e5d0df5c8d
2015-11-24 19:42:28 -08:00
Birunthan Mohanathas
54720f2a75 Bug 1235261 - Part 7: Remove AutoInfallibleTArray. r=froydnj 2016-02-02 17:36:31 +02:00
Birunthan Mohanathas
62cff61cda Bug 1235261 - Part 5: Merge nsAutoArrayBase into AutoTArray. r=froydnj
nsAutoArrayBase is no longer needed because AutoTArray is its only subclass.
2016-02-02 17:36:30 +02:00
Birunthan Mohanathas
7104c2aaa5 Bug 1235261 - Part 4: Remove AutoFallibleTArray. r=froydnj 2016-02-02 17:36:30 +02:00
Birunthan Mohanathas
d7371d07d0 Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-02-02 17:36:30 +02:00
Nicholas Nethercote
53001db0dd Bug 1244606 - Remove PL_DHASH_FASTCALL. r=froydnj.
FindFreeEntry() has one caller, so using MOZ_ALWAYS_INLINE should be good
enough for it. As for SearchTable(), NS_FASTCALL is the same as
PL_DHASH_FASTCALL and so can be used instead.

--HG--
extra : rebase_source : 814f96d4751922785358e7a4f9d64fcf522364c1
2016-02-02 06:27:57 +11:00
Phil Ringnalda
d381b4bca6 Back out 7 changesets (bug 1235261) for cpptest failures in TestTArray
CLOSED TREE

Backed out changeset d66c3f19a210 (bug 1235261)
Backed out changeset 467d945426bb (bug 1235261)
Backed out changeset 32b61df13142 (bug 1235261)
Backed out changeset c50bb8ed4196 (bug 1235261)
Backed out changeset 0ff0fa6fe81f (bug 1235261)
Backed out changeset df70e89669da (bug 1235261)
Backed out changeset 064969357fc9 (bug 1235261)
2016-01-31 10:10:57 -08:00
Birunthan Mohanathas
d39376e4d0 Bug 1235261 - Part 7: Remove AutoInfallibleTArray. r=froydnj 2016-01-31 17:12:13 +02:00
Birunthan Mohanathas
fbff06ea09 Bug 1235261 - Part 5: Merge nsAutoArrayBase into AutoTArray. r=froydnj
nsAutoArrayBase is no longer needed because AutoTArray is its only subclass.
2016-01-31 17:12:12 +02:00
Birunthan Mohanathas
6ed751e586 Bug 1235261 - Part 4: Remove AutoFallibleTArray. r=froydnj 2016-01-31 17:12:12 +02:00
Birunthan Mohanathas
373593275e Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-01-31 17:12:12 +02:00
Sylvestre Ledru
ab4e3a0d42 Bug 1218816 - Remove useless semicolons. Found by coccinelle. r=Ehsan
--HG--
extra : rebase_source : 7d2cc56b6553cd7a8d848d3c660f30735bd82eec
2016-01-22 16:58:49 +01:00
Nicholas Nethercote
add2713c12 Bug 1239888 - Inline PLDHashTable::{Done,Get}(). r=froydnj.
They're trivial and very hot. This reduces binary size in a 64-bit Linux opt build by 20 KiB and avoiding the calls can only help performance.

--HG--
extra : rebase_source : 774e6ffff9c787fa5444f939d1236d994ac8cf5b
2016-01-14 21:39:11 -08:00
Jeff Muizelaar
bb453ca522 Bug 1228641. Add a initializer_list constructor to nsTArray. r=froydnj
This also adds a couple of users of the new pattern.
2016-01-17 22:11:25 -05:00
Nicholas Nethercote
ec89bbf7f2 Bug 1237151 (part 3) - Remove ignored qualifiers in all remaining code. r=froydnj. 2016-01-05 17:08:45 -08:00
Wes Kocher
9b5c90690e Merge inbound to m-c a=merge
--HG--
extra : commitid : I44HufYdnXT
2016-01-05 16:02:49 -08:00
Gabriele Svelto
c7edb0ffaf Bug 1234176 - Introduce and use the WriteSysFile() helper function. r=dhylands
--HG--
extra : rebase_source : c976b7434f660bc7b5fdc19bce800990c96443cb
2015-12-29 11:49:50 +01:00
Terrence Cole
bb224242a8 Bug 1235598 - Part 2: Use TraceEdge exclusively in Gecko; r=smaug
--HG--
extra : rebase_source : 27afd7eecd5a13f8d28b888b64d5e44b3c4a74a5
2015-12-30 08:52:14 -08:00
Wes Kocher
a69ea37914 Backed out 2 changesets (bug 1235598) for linux reftest bustage
Backed out changeset 3bcd3c276785 (bug 1235598)
Backed out changeset 80cd10a8b3d7 (bug 1235598)

--HG--
extra : commitid : DZRlFy6bH2m
extra : rebase_source : 3479cd1146e58115883f2329861647a962d162cc
2015-12-31 15:51:13 -08:00
Terrence Cole
9d97726f6c Bug 1235598 - Part 2: Use TraceEdge exclusively in Gecko; r=smaug
--HG--
extra : rebase_source : c18f7e97d09f0cd91d0d837d2cdc65926cd3de64
2015-12-30 08:52:14 -08:00