Commit Graph

800 Commits

Author SHA1 Message Date
Birunthan Mohanathas
e52329c788 Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Michael Layzell
1a947e7297 Bug 1180993 - Part 2: Add the MOZ_MUST_USE attribute to mfbt, and use it to verify usage of already_AddRefed. r=ehsan 2015-07-06 21:42:00 -04:00
Steve Fink
7eba9889ce Bug 1180299 - Implement ScopeExit for running actions at the end of a scope, r=Waldo 2015-07-03 14:20:55 -07:00
Xidorn Quan
1e6359f6d7 Bug 1175485 part 4 - Add unit test for integer range. r=waldo 2015-07-02 13:31:07 +10:00
Xidorn Quan
35b2239278 Bug 1175485 part 3 - Remove unused operators, typedefs and IteratorTraits. r=waldo 2015-07-02 13:31:07 +10:00
Xidorn Quan
3f14e188e0 Bug 1175485 part 2 - Add static_assert to MakeRange to ensure it is used with integers. r=waldo 2015-07-02 13:31:07 +10:00
Xidorn Quan
2884d76b1c Bug 1175485 part 1 - Allow inner iterator of ReverseIterator deref to any type, and change IntegerIterator, EnumeratedRange, and nsFrameList::Iterator to return value type instead of a reference. r=roc,waldo 2015-07-02 13:31:07 +10:00
Nathan Froyd
51fdfa32f5 Bug 1161627 - part 3 - remove TemporaryRef<T> from RefPtr.h; r=ehsan 2015-05-05 13:22:12 -04:00
Nathan Froyd
46d6f38e68 Bug 1161627 - part 2 - machine-convert TemporaryRef<T> to already_AddRefed<T>; r=ehsan
This conversion was done with the script:

  find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl' | \
    egrep -v 'cairo-win32-refptr.h|RefPtr.h|TestRefPtr.cpp' | \
    xargs sed -i -e 's/mozilla::TemporaryRef</already_AddRefed</g' \
                 -e 's/TemporaryRef</already_AddRefed</g'

Manual fixups were performed in the following instances:

- We handled mfbt/RefPtr.h manually so as to not convert TemporaryRef itself
  into already_AddRefed.

- The following files had explicit Move() calls added to make up for the lack
  of a copy constructor on already_AddRefed:

  dom/base/ImageEncoder.cpp
  dom/media/MediaTaskQueue.{h,cpp}
  dom/media/webaudio/PannerNode.cpp

- A redundant overload for MediaTaskQueue::Dispatch was deleted.

- A few manual fixups were required in mfbt/tests/TestRefPtr.cpp.

- Comments, using declarations, and forward declarations relating to
  TemporaryRef in dom/canvas/ and gfx/layers/ were changed to refer to
  already_AddRefed.
2015-06-17 10:00:52 -04:00
Nick Fitzgerald
8583ece95d Bug 1174906 - Add a mozilla::Variant<T1, T2, ...> template class; r=Waldo 2015-06-30 10:01:00 -07:00
Markus Stange
0528311764 Bug 1165185 - Try to avoid invalidations when scrolling transformed elements. r=roc 2015-06-15 19:20:59 -04:00
Nicholas Nethercote
9d4dcf615a Bug 1174046 - Fix PLDHashTable::Iterator in chaos mode again. r=froydnj, a=philor
CLOSED TREE

If you use PLDHashTable::Iterator in chaos mode with a table with zero
capacity, a |% 0| operation takes place in randomUint32LessThan. This change
avoids that.
2015-06-11 18:23:26 -07:00
Nathan Froyd
3d34ab1a0b Bug 1161627 - part 1 - add move constructor and assignment operator for already_AddRefed&& to RefPtr; r=ehsan
This change is prep work for future mass rewriting.
2015-05-05 13:02:21 -04:00
Kartikaya Gupta
1b00006d7a Bug 1164218 - Allow running individual mochitests and reftests in chaos mode. r=roc,froydnj 2015-06-04 13:44:55 -04:00
Michael Layzell
14e80467b9 Bug 1169337 - Clarify MOZ_{NON_,}OWNING_REF/MOZ_UNSAFE_REF documentation. r=froydnj 2015-06-01 14:44:00 -04:00
Milan Sreckovic
a5295afcda Bug 1131463 - Report AtomicRefCounterWithFinalize doing the wrong thing with AddRef and Release in release build as well. r=sotaro 2015-05-29 16:41:28 -04:00
Bobby Holley
4417102168 Bug 1168008 - Make IsConvertible handle void. r=gerald 2015-05-28 16:03:08 -07:00
Mike Hommey
2c863b9fe4 Bug 991983 - Define SOURCES as SourcePath. r=gps 2015-05-28 07:34:15 +09:00
Kartikaya Gupta
3cb1d2d0cc Bug 1160285 - Add a staticruntime version of mfbt and link some stuff against it. r=glandium 2015-05-27 17:22:29 -04:00
Botond Ballo
0fe06cffa0 Bug 1119980 - Use 'snprintf' instead of 'sprintf' to avoid a warning on Lollipop-based builds. r=froydnj 2015-05-26 14:33:55 -04:00
Phil Ringnalda
f3d4dd7e09 Back out 3 changesets (bug 1119980) for emulator-l bustage
CLOSED TREE

Backed out changeset 12ce98475c6e (bug 1119980)
Backed out changeset bdb8d05f8870 (bug 1119980)
Backed out changeset a68a18840492 (bug 1119980)
2015-05-25 18:48:51 -07:00
Botond Ballo
9a8e8b29e8 Bug 1119980 - Use 'snprintf' instead of 'sprintf' to avoid a warning on Lollipop-based builds. r=froydnj 2015-05-25 20:45:17 -04:00
Cameron McCormack
59ffc9e720 Bug 1147766 - Part 1: Add a mozilla::RangedArray class, for fixed length arrays with a non-zero base index. r=waldo 2015-05-23 12:50:44 +10:00
Cameron McCormack
a996e7cdac Backed out changeset a6fa096f9853 and ec1c41143ff6 (bug 1147766) since I messed up the warning fix. 2015-05-23 15:51:14 +10:00
Cameron McCormack
f76dafa123 Bug 1147766 - Part 1: Add a mozilla::RangedArray class, for fixed length arrays with a non-zero base index. r=waldo 2015-05-23 12:50:44 +10:00
Phil Ringnalda
7a5f1ade1f Back out 2 changesets (bug 1147766) for -Werror bustage
CLOSED TREE

Backed out changeset 10d6fcd9a4e0 (bug 1147766)
Backed out changeset 5754455de846 (bug 1147766)
2015-05-22 20:24:08 -07:00
Cameron McCormack
f0087396a3 Bug 1147766 - Part 1: Add a mozilla::RangedArray class, for fixed length arrays with a non-zero base index. r=waldo 2015-05-23 12:50:44 +10:00
Botond Ballo
7ec8c57227 Bug 1163329 - Add a utility for expanding a tuple into a variadic argument list to MFBT. r=froydnj 2015-05-11 17:23:33 -04:00
Botond Ballo
c8d54a98aa Bug 1163328 - Tests for mozilla::Tuple. r=froydnj 2015-05-21 21:14:25 -04:00
Botond Ballo
bc08a1f31c Bug 1163328 - Add a Tuple class to MFBT. r=froydnj 2015-05-21 22:33:49 -04:00
Botond Ballo
790f8b5d45 Bug 1163328 - Add an And<...> class to TemplateLib.h which performs logical and on a variadic number of booleans known at compile time. r=froydnj 2015-05-21 22:33:39 -04:00
Nathan Froyd
f61c010661 Bug 1160485 - remove implicit conversion from RefPtr<T> to TemporaryRef<T>; r=ehsan
Having this implicit conversion means that we can silently do extra
refcounting when it's completely unnecessary.  It's also an obstacle to
making RefPtr more nsRefPtr-like, so let's get rid of it.
2015-05-01 09:14:16 -04:00
Nathan Froyd
6e617deb41 Bug 1116905 - part 4 - remove implicit conversion from non-nullptr T* to TemporaryRef<T>; r=ehsan 2015-04-30 15:21:05 -04:00
Nathan Froyd
3e410cfd9b Bug 1116905 - part 2 - add MakeAndAddRef helper function to facilitate constructing TemporaryRef; r=Ms2ger
With implicit conversion to TemporaryRef going away, one can no longer write:

  return new T(...);

in a function returning TemporaryRef<T>.  Instead, provide MakeAndAddRef
to prevent people from having to construct boilerplate RefPtrs or
similar.  It also makes converting from TemporaryRef to already_AddRefed
somewhat easier.
2015-04-30 15:19:49 -04:00
Nathan Froyd
c39128bbad Bug 1116905 - part 1 - remove dependence on implicit conversion from T* to TemporaryRef<T>, non-gfx changes; r=ehsan 2015-04-30 15:17:08 -04:00
Gerald Squelart
7ad6a88844 Bug 1153295 - Add mozilla::Declval. r=nfroyd 2015-04-27 18:11:00 -04:00
Gerald Squelart
bd71eec5c9 Bug 1153295 - Add mozilla::AddRvalueReference. r=nfroyd 2015-04-27 18:07:00 -04:00
Andrew McCreight
fb796b8e9b Bug 1113300 - Add a way to use SegmentedVector like a stack. r=froydnj 2015-05-07 09:11:00 +02:00
Shu-yu Guo
245b492878 Bug 1154115 - Rewrite profiler JSON streaming. (r=mstange) 2015-05-11 14:16:44 -07:00
Trevor Saunders
0ce61da842 no bug - fix -Wreturn-type warning on a CLOSED TREE 2015-05-06 11:12:46 -04:00
Trevor Saunders
46d0164fdd bug 606080 - add SplayTree::LookupOrAdd r=froydnj 2015-05-06 10:57:12 -04:00
Eric Rahm
4922445e33 Bug 1145056 - Assert that the guard notifier has been initialized. r=froydnj
In order to both verify that guard object notifiers are being properly used
and to silence a coverity warning about an explicit null dereference we
switch over to using a poison value rather than nullptr. An assertion is added
to make sure that the guard object notifier is properly initialized as well.
2015-04-21 16:47:52 -07:00
Andrew McCreight
8145d04124 Bug 1062479 - Use static strings for WeakReference type names. r=ehsan 2015-04-24 09:43:01 -07:00
Jim Blandy
cf24b249ee NO BUG: Remove incorrect comment about not being able to use variadic templates. DONTBUILD r=waldo 2015-04-23 16:48:19 -07:00
Jeff Walden
3886e5a7ec Bug 1140752 - Land code to self-host %TypedArray%.prototype.set, but don't enable it yet, pending perf-testing. This shouldn't make any changes to the build, except in terms of adding more code to it and affecting binary layout. r=jandem, also much feedback from till that effectively amounts to a review as well 2015-03-04 00:04:53 -08:00
Ehsan Akhgari
d278570d19 Bug 1153348 - Add an analysis to prohibit operator bools which aren't marked as either explicit or MOZ_IMPLICIT; r=jrmuizel
This is the counterpart to the existing analysis to catch
constructors which aren't marked as either explicit or
MOZ_IMPLICIT.
2015-04-21 21:40:49 -04:00
Wes Kocher
01d294be4b Backed out changeset 02e6a50741a9 (bug 1153348) to hopefully fix the static bustage CLOSED TREE 2015-04-21 15:47:40 -07:00
Ehsan Akhgari
74f43d26e8 Bug 1153348 - Add an analysis to prohibit operator bools which aren't marked as either explicit or MOZ_IMPLICIT; r=jrmuizel
This is the counterpart to the existing analysis to catch
constructors which aren't marked as either explicit or
MOZ_IMPLICIT.
2015-04-21 16:31:58 -04:00
Seth Fowler
f4877af3dc Bug 1155864 - Rip out Windows intrinsics from Atomics.h and allow Atomic to hold 64-bit types everywhere. r=Waldo 2015-04-17 18:40:52 -07:00
Jim Blandy
c49a3b9f79 Bug 1145051: Use MOZ_WARN_UNUSED_RESULT instead of NS_WARN_UNUSED_RESULT. r=glandium 2015-03-19 00:46:40 -07:00