Граф коммитов

2539 Коммитов

Автор SHA1 Сообщение Дата
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