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
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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