Commit Graph

260 Commits

Author SHA1 Message Date
Mike Hommey
017feef7d9 Bug 834769 - Change the "destroyed" state value for RefCounted. r=Waldo 2013-01-29 09:35:16 +01:00
Jeff Walden
582b2e961d Bug 835648 - Move typed enum support to a new header. r=Ms2ger 2013-01-28 16:33:17 -08:00
Ryan VanderMeulen
18cfd86d7e Backed out changeset 3eb633a97c1f (bug 835648) for suspected Windows orange on a CLOSED TREE. 2013-01-29 19:01:45 -05:00
Jeff Walden
129a025dee Bug 835648 - Move typed enum support to a new header. r=Ms2ger
--HG--
extra : rebase_source : 8c912fba889c1c5435e3619714071502fbfb30a3
2013-01-28 16:33:17 -08:00
Mike Hommey
6e52d18740 Backout changeset bc2bbe9836c7 (bug 834769) for bustage. 2013-01-29 09:49:16 +01:00
Mike Hommey
592595bea6 Bug 834769 - Change the "destroyed" state value for RefCounted. r=Waldo 2013-01-29 09:35:16 +01:00
Chris Peterson
0cff339be7 Bug 831633 - Back out 1c7bdeefa8ee (bug 830315) for introducing hundreds of non-virtual dtor warnings. r=waldo 2013-01-24 22:59:46 -08:00
Mounir Lamouri
f929fe87f0 Bug 828472 - Introduce AutoJSContext and SafeAutoJSContext helpers and use them for date handling in nsHTMLInputElement. f=bz r=bholley 2013-01-21 12:38:54 +00:00
Matt Woodrow
8a4599ca60 Bug 822906 - Add SplayTree to mfbt. r=waldo 2013-01-16 12:12:05 +13:00
Chris Peterson
0c00315d90 Bug 785918 - Part 2: Add MOZ_HAVE_CXX11_CONSTEXPR check and constexpr version of ArrayLength(). r=waldo
--HG--
extra : rebase_source : e826347bfdedc949614c9cca294858b7150dfda1
2013-01-07 23:29:00 -08:00
Mike Hommey
1bbb07f9dd Bug 830315 - Don't enable MOZ_FINAL and MOZ_DELETE on clang unless compiling as C++11. r=Waldo 2013-01-15 10:12:49 +01:00
Ehsan Akhgari
104014cc99 Rewrite RangedPtr's constructor accepting a C-style array in C++, no bug, rs=Waldo
This will let the compiler correctly deduce N without making the
caller explicitly pass it in.
2013-01-14 19:48:42 -05:00
Terrence Cole
10fccde0ad Bug 811060 - Implement mozilla::Range; r=Waldo
--HG--
extra : rebase_source : a303294de705fca72eb31f7b5c7db787d0bc7260
2012-11-12 16:37:33 -08:00
Chris Peterson
4c4bf85b10 Bug 785918 - Part 1: Replace PR_ARRAY_SIZE() with mozilla::ArrayLength() and MOZ_ARRAY_LENGTH(). r=ehsan 2013-01-05 23:37:25 -08:00
Terrence Cole
5929f21c7f Bug 799252 - Remove SkipRoots in jsstr.cpp; r=Waldo 2012-10-16 16:30:02 -07:00
Chris Peterson
deed807086 Bug 826144 - Add MOZ_UTF16_HELPER() intermediary macro to handle UTF-16 stringification and concatenation correctly. r=waldo
--HG--
extra : rebase_source : 4c68df10e6e59af34db1e325232d4671492cc72f
2013-01-02 14:49:09 -08:00
Masatoshi Kimura
bc1410bc83 Bug 823917 - Use C++11 final on MSVC11. r=waldo 2013-01-03 04:47:26 +09:00
Chris Peterson
ae15b310c6 Bug 796948 - Create Char16.h header file for char16_t type. r=waldo 2012-12-12 00:34:20 -08:00
Trevor Saunders
e3b2aa92a5 bug 822717 - remove checks for old gcc r=glandium 2012-12-18 13:22:28 -05:00
Jeff Walden
6c3e077664 Bug 756709 - Make ThreadLocal::set crash on failure (which really can only happen if per-thread memory for the TLS entry couldn't be allocated, which should be really rare). r=Ms2ger
--HG--
extra : rebase_source : ecda463195c9b67ef6b7d02ef32ed0aa56bc11bc
2012-12-17 15:40:50 -05:00
Jeff Muizelaar
2eb25e2d11 Bug 821804 - Allow unitialized WeakPtrs to work properly. r=Waldo
This ensures that the WeakPtr always points at a valid object and avoids the
need to test for that during operations.
2012-12-18 11:37:14 -05:00
Jeff Walden
7146c23e80 Bug 820570 - Move mozilla::DebugOnly into DebugOnly.h to pare down the grab-baggish Util.h. r=Ms2ger 2012-12-14 18:58:45 -05:00
Chris Peterson
07acbe70d0 Bug 818941 - Fix misspelling of __GXX_EXPERIMENTAL_CXX0X__ macro. r=ehsan 2012-12-06 00:05:26 -08:00
Brian Smith
79b9a37db4 Bug 812531: Make MOZ_TYPE_SPECIFIC_SCOPED_POINTER_TEMPLATE comply with two-phase template name lookup rules, as clang requires, r=khuey
--HG--
extra : rebase_source : 5c4c8c0ff4f2dfcb4d83e63376036a5bf45ab0ab
2012-11-15 17:02:11 -08:00
Kyle Huey
df5a32b6e5 Bug 812824: Use a clean struct for inheritance on root nodes. r=dbaron,Waldo 2012-11-28 13:21:36 -08:00
Anthony Jones
240d159624 Bug 793013 - Add EnumSet to replace 1 << n bit type bitfields. r=Waldo 2012-11-06 18:23:13 -05:00
Ehsan Akhgari
da3a7f10d8 Bug 808876 - Part 0: Only allow the usage of enum classes in gcc 4.5 and newer; r=bzbarsky
Older gccs such as gcc 4.4 cannot handle comparison operators taking
arguments of the enum class type, which would cause valid C++ code
to not compile.  So we should just use our fallback enum class
emulation on those platforms.

--HG--
extra : rebase_source : 3cd2fd2faabc36c767e76442efabf55f8a54c83f
2012-11-06 09:38:32 -05:00
Jeff Walden
e6ce95979f Add more thisDuringConstruction() use in LinkedList to silence warnings. No bug, r=lumpy
--HG--
extra : rebase_source : 7dfb17c38e4efd4ea4bdc48326e792814b990658
2012-11-05 13:36:50 -08:00
Jeff Walden
793acbdae0 Bug 803439 - Add removeFrom() that takes a list and asserts the element is initially present in it. r=jlebar
--HG--
extra : rebase_source : c2aad35774a71167f97f940fb416735862b78950
2012-10-23 17:43:23 -07:00
Benoit Jacob
940634a237 Bug 784309 - CheckedInt.h Intel C++ compilation issue - r=Ms2ger 2012-11-02 11:30:40 -04:00
Rafael Ávila de Espíndola
111917a5c3 Bug 807112 - change MOZ_EXPORT_API and MOZ_IMPORT_API to not take the type. r=Waldo. 2012-10-31 18:18:12 -04:00
Justin Lebar
b25232b0f8 Bug 803688 - Re-land backed out part of bug 803688 now that we have bug 805207 fixed.
This changeset reverts the partial-backout cset 5c82f5a5e90d, taking us back to the state we were in at bug 803688's initial landing, rev 592c3465a742.
2012-10-31 13:30:35 -04:00
Rafael Ávila de Espíndola
62e42f569e Bug 805416 - refactor macros to avoid the need for empty macro arguments. r=Waldo.
--HG--
extra : rebase_source : 86242ff253d464870cdcc321f9b1f6f08460b839
2012-10-30 16:12:22 -04:00
Rafael Ávila de Espíndola
27bc84084e Bug 806538 - Update double-conversion and document the version we are at. r=Waldo.
--HG--
extra : rebase_source : 5394aab0cb622ad3723ca01a91712ce7cc9ae145
2012-10-30 15:30:08 -04:00
Ed Morley
415466b584 Backout fdb7c9649a07 (bug 805967), 72003517a631 (bug 806538), 354250ed1e72 (bug 770538), ea6edd3749ce (bug 770538) for bustage on a CLOSED TREE 2012-10-30 17:56:20 +00:00
Rafael Ávila de Espíndola
c1b7f7b096 Bug 806538 - Update double-conversion and document the version we are at. r=Waldo.
--HG--
extra : rebase_source : 7e7ec80943329342c2305370dd0fe6bde46433a4
2012-10-30 11:48:56 -04:00
Jacek Caban
874e8b2ffd Bug 805773 - TestSHA1.exe fails to link on mingw r=espindola 2012-10-29 10:21:33 +01:00
Jeff Muizelaar
424c086cdc Bug 805951. Fix __GNU_MINOR__ typo in NullPtr.h
Pointed out by Chris Peterson.
2012-10-26 16:29:55 -04:00
Ehsan Akhgari
439bc84904 Add a comment about MOZ_BEGIN_ENUM_CLASS/MOZ_END_ENUM_CLASS to say that they should not be used for nested enums, no bug
DONTBUILD
2012-10-26 13:56:54 -04:00
Ryan VanderMeulen
ce3b1256de Partial backout of bug 803688 to fix Win7 debug xpcshell perma-purple. r=jlebar 2012-10-24 22:46:14 -04:00
Rafael Ávila de Espíndola
36d17fb8f3 Bug 777122 - Add telemetry reporting of late writes. r=jlebar. 2012-10-24 15:42:54 -04:00
Rafael Ávila de Espíndola
413c99d3c7 Bug 805096 - Better explain why we use __attribute__((weak)). r=glandium.
--HG--
extra : rebase_source : 8db4439601c47c3f969d11694e5859dc44ca68d0
2012-10-24 14:33:45 -04:00
Justin Lebar
29ab4a7b54 Bug 803688 - Remove LinkedListElements from their list when they're destructed, and assert that a LinkedList is empty when it's destructed. r=waldo 2012-10-24 12:40:35 -04:00
Ehsan Akhgari
53b927b709 Bug 802806 followup - fix the comment 2012-10-22 17:05:07 -04:00
Justin Lebar
9de35188e7 Bug 803692 - Make SHA1Sum::update() take a void* instead of a uint8_t*. r=waldo 2012-10-22 16:32:34 -04:00
Jeff Walden
20abf11fd5 Give LinkedListElement a thisDuringConstruction() method, and use it in member initialization to silence an MSVC compiler warning. No bug, r=sparky
--HG--
extra : rebase_source : b0859f6d169255196cb59d40504ed08b1074e9a4
2012-10-18 18:39:54 -07:00
Ehsan Akhgari
d1330c1949 Bug 802806 - Make mfbt's IsBaseOf work with multiple inheritance; r=Waldo 2012-10-17 17:37:53 -04:00
Joe Drew
101fab9469 Bug 801120 - Support T* WeakPtr<T>::get(). r=Ms2ger,ehsan
--HG--
extra : rebase_source : 662ef6f39966956be5588d9bd7508dbe59a2c537
2012-10-12 18:17:58 -04:00
Jeff Walden
50aa5b0b82 Minor style nits in WeakPtr code forgotten by me when reviewing. No bug, r=sparky
--HG--
extra : rebase_source : e8b8071218c9280e970ba4525a3e8ebab729d4eb
2012-10-08 16:03:52 -07:00
Jeff Walden
dede03d303 Move TestBloomFilter out of XPCOM and into mfbt/tests, now that it exists. No bug, r=testingonlychange
--HG--
extra : rebase_source : 85a2a56bcc02bf122ee7fd21d16dffd534d1c98d
2012-10-03 17:09:59 -07:00
Jeff Walden
45fceaa15e Bug 798634 - Style patrol on mfbt/SHA1.*. r=espindola
--HG--
extra : rebase_source : 7282b80ebe5f23b669a5f3142f3a6e50b6776789
2012-08-28 17:27:05 -07:00
Terrence Cole
e7ed15573e Bug 798624 - Specialize low-level character access to JSStableString; r=luke, rs=Waldo
Implements JSStableString::chars() and pushes StableCharPtr into the interface
at several key choke-points. This will solidly enforce the requirement that we
have uninlined jschar*s in places that we may GC with a jschar* on the stack.

--HG--
extra : rebase_source : 122785b474af371ed22d43a6bfcb600c05440405
2012-10-08 15:04:36 -07:00
Terrence Cole
98b249d2c0 Backout 754a1efb5b37 for bustage on a CLOSED TREE 2012-10-08 15:42:39 -07:00
Terrence Cole
d079920e40 Bug 798624 - Specialize low-level character access to JSStableString; r=luke, rs=Waldo
Implements JSStableString::chars() and pushes StableCharPtr into the interface
at several key choke-points. This will solidly enforce the requirement that we
have uninlined jschar*s in places that we may GC with a jschar* on the stack.

--HG--
rename : content/html/content/test/test_bug797113.html => content/html/content/test/test_bug780993.html
extra : rebase_source : 19b24e3decfc37c7387ea941233aec8239550927
2012-10-08 15:04:36 -07:00
Jeff Muizelaar
644f4e96df Bug 792954. Add a WeakPtr implementation to use instead of nsISupportsWeakReference. r=joe,ehsan,Waldo
This patch also replaces the usage of nsISupportsWeakReference in RasterImage as an example.

--HG--
extra : rebase_source : ac6a039dcc3227a04ac4c2221f38856bb308c695
2012-10-04 15:45:07 -04:00
Brian Smith
86b02dd41f Bug 767240 - Make it easier to create type-specific scoped pointers (TYPE_SPECIFIC_SCOPED_POINTER_TEMPLATE), r=jwalden
--HG--
extra : rebase_source : 845b429d56ee1abb296925624928c355451edc3c
2012-07-24 15:36:06 -07:00
Ms2ger
da175e40b7 Bug 792689 - Add some double negations to the macros in Likely.h; r=Waldo 2012-09-20 13:17:05 +02:00
Kyle Huey
a67b677be2 Try backing out bug 792689 because it's the only non-merge cset in the MaxHeap regression range for both m-i and m-c. 2012-09-20 12:42:13 -07:00
Ms2ger
87fb623851 Bug 792689 - Add some double negations to the macros in Likely.h; r=Waldo 2012-09-20 13:17:05 +02:00
Jeff Muizelaar
d6345f3cb2 Bug 782647. Move the nullptr workaround macros to MFBT so that it can be shared. r=waldo
This also changes the header to use compiler detection instead of a
configure test. This makes the header more portable because
it doesn't require the configure infrastructure.
2012-09-01 16:16:17 -04:00
Raphael Catolino
516fde7d59 Bug 781313 - Move the euclidGcd and lcm algos form nsStyleAnimation.cpp to mfbt/MathAlgorithms.h r=dbaron,luke 2012-08-26 22:58:23 -03:00
Ehsan Akhgari
0fd9123eac Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg
This patch was generated by a script.  Here's the source of the script for
future reference:

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert PRInt8 int8_t
convert PRUint8 uint8_t
convert PRInt16 int16_t
convert PRUint16 uint16_t
convert PRInt32 int32_t
convert PRUint32 uint32_t
convert PRInt64 int64_t
convert PRUint64 uint64_t

convert PRIntn int
convert PRUintn unsigned

convert PRSize size_t

convert PROffset32 int32_t
convert PROffset64 int64_t

convert PRPtrdiff ptrdiff_t

convert PRFloat64 double
2012-08-22 11:56:38 -04:00
Rafael Ávila de Espíndola
46187ed184 Bug 784381 - Build bustage for comm-central - SHA1.h - Cannot open include file: 'stdint.h. r=ms2ger. 2012-08-21 12:43:33 -04:00
Rafael Ávila de Espíndola
8f3f5d21c4 Bug 781627 - Copy security/nss/lib/freebl/sha_fast.c to mfbt. r=jlebar. 2012-08-20 15:01:55 -04:00
Aryeh Gregor
62eee98b10 Bug 782919 - Add zero-arg constructor to enum class workaround; r=ehsan 2012-08-16 14:58:12 +03:00
Ed Morley
8f4f1ad013 Backout 19ec214f806c (bug 782916), 88b802832f52 (bug 782919), f16429aa2210 (bug 780474) for Android build failures 2012-08-17 12:25:12 +01:00
Aryeh Gregor
8be87f0303 Bug 782919 - Add zero-arg constructor to enum class workaround; r=ehsan 2012-08-16 14:58:12 +03:00
Aryeh Gregor
a6dad5d25a Bug 751554 part 2 - Support strongly-typed enums in MFBT; r=ehsan 2012-08-01 15:19:00 +03:00
Aryeh Gregor
f0251cc7b5 Bug 751554 part 1 - Support explicit underlying enum types in MFBT; r=cjones 2012-08-05 12:11:24 +03:00
Nicholas Nethercote
d05b248e0f Bug 647367 - Sequester jshash.{h,cpp} in js/jsd/ (attempt 2). r=luke.
--HG--
rename : js/src/jshash.cpp => js/jsd/jshash.cpp
rename : js/src/jshash.h => js/jsd/jshash.h
2012-07-18 17:38:10 -07:00
Sergey Glushchenko
970c894833 Bug 776429: Unify scattered M_PI definitions into mfbt/Constants.h r=dRdR 2012-08-06 13:32:11 -07:00
Mike Hommey
6173fa297f Bug 774032 bonus - Use @DEPTH@ and @relativesrcdir@ in Makefile.in. r=ted 2012-08-04 20:26:44 +02:00
Benoit Jacob
2c1495e61f Bug 768538 - CheckedInt: HasSignBit should return bool - r=Ms2ger 2012-07-08 11:44:22 -04:00
Benoit Jacob
033b7d4499 Bug 768538 - CheckedInt: code simplification; remove the separate operator/ implementation - r=Ms2ger 2012-07-08 11:25:24 -04:00
Benoit Jacob
32979f1189 Bug 768570 - Fix all the warnings in CheckedInt - r=jwalden 2012-07-05 10:13:31 -04:00
Benoit Jacob
6aada1fe80 Bug 768538 - 2/2 - Fix undefined behavior in the CheckedInt unit test - r=jwalden 2012-07-05 10:13:23 -04:00
Benoit Jacob
91d02dae9f Bug 768538 - 1/2 - Fix undefined behavior in CheckedInt - r=jwalden 2012-07-05 10:13:13 -04:00
Jeff Walden
dfad117b73 Bug 766347 - Implement mozilla::IsConvertible to detect when a value of one type will convert to a value of another type. r=luke
--HG--
extra : rebase_source : d25c1b84dfc928a0bc4dcfb43e31b6035882849e
2012-06-19 13:55:23 -07:00
Jeff Walden
a268b163ad Bug 766347 - Implement a mozilla::EnableIf template struct for SFINAE capabilities. r=luke
--HG--
extra : rebase_source : 06807195217a967142ab7d81ac8b120f2b0e02c7
2012-06-18 19:06:33 -07:00
Jeff Walden
4bea2ef35c Eliminate Assertions.h's dependency on Types.h, for a narrower interface and minimized dependencies. No bug, r=Ms2ger
--HG--
extra : rebase_source : b5c79dc444ef7277f2624ffe2407bca25a1054cd
2012-06-11 16:16:46 -07:00
Jeff Walden
717ec330df Bug 760995 - Move Scoped.h into the mozilla namespace. r=sparky
--HG--
extra : rebase_source : 534c787c834fc1d7174b51d8fb8f13ec339c0a58
2012-06-11 16:16:47 -07:00
Jeff Walden
bbe15a85b7 Bug 426163 - Make MOZ_CRASH() use TerminateProcess on Windows rather than exit so that destructors and atexit handlers aren't called. r=ted
--HG--
extra : rebase_source : 0e340516158d36931fd00824a6ff9e665a9f9354
2012-06-11 16:16:46 -07:00
Ed Morley
712c4f68c8 Backout 1c5a8d617bff (bug 765990), 617cb36ead59, b3067d05a76a (bug 760995), 79f9a61a1e43 (bug 426163) for bustage 2012-06-21 10:00:36 +01:00
Jeff Walden
45aa6ec729 Eliminate Assertions.h's dependency on Types.h, for a narrower interface and minimized dependencies. No bug, r=Ms2ger
--HG--
extra : rebase_source : 0d68ef6274ad697bf4ff49038ef19368174dad54
2012-06-11 16:16:46 -07:00
Jeff Walden
ac77cd55ab Bug 760995 - Move Scoped.h into the mozilla namespace. r=sparky
--HG--
extra : rebase_source : ea32c4240ea552c72ed16074c803927e638474dc
2012-06-11 16:16:47 -07:00
Jeff Walden
51e2957954 Bug 426163 - Make MOZ_CRASH() use TerminateProcess on Windows rather than exit so that destructors and atexit handlers aren't called. r=ted
--HG--
extra : rebase_source : 631b1707f06852f4c47acbfb9c7401b22507267b
2012-06-11 16:16:46 -07:00
Jeff Walden
dd05414940 Bug 761859 - Reinstate a __debugbreak() at the start of MOZ_CRASH() on Windows so that deliberate crashes on Windows appear as breakpoints, not invalid writes. r=bsmedberg 2012-06-18 12:01:57 -07:00
Jeff Walden
09e6c025d8 Bug 763000 - Remove MOZ_Assert. r=Ms2ger, r=terrence, r=ted 2012-06-07 14:41:11 -07:00
Jeff Walden
45accfa179 Fix a couple style nits missed during review. Followup to bug 616262, r=sparky 2012-06-14 17:55:11 -07:00
Mike Hommey
85ca2ebed8 Bug 616262 - Add mozilla/TypeTraits.h with mozilla::Conditional and mozilla::IsBaseOf traits, similar to resp. C++11 std::conditional and std::is_base_of. r=Waldo 2012-06-14 08:20:47 +02:00
Jeff Walden
7b44ac5b41 Bug 761857 - Make MOZ_CRASH on Linux crash in such a way that an attached debugger will park on the line containing the assertion. r=ted
--HG--
extra : rebase_source : 0628998cb0e2eec047426375c971aac1a84ebed1
2012-06-05 16:49:19 -07:00
Jeff Walden
03b6751e09 Style patrol to make everything conform to mfbt/STYLE. No bug, r=sparky 2012-06-03 20:36:43 -07:00
Jeff Walden
6400135f0b Remove some extraneous includes and a function, all added in bug 714260. They were initially necessary when that patch was written, but they became vestigial during rebasing prior to landing, and this disuse wasn't noticed til now. r=lumpy 2012-04-19 16:36:31 -07:00
Justin Lebar
c75bf63164 Bug 758337 - Fix mistake in comment in mfbt/LinkedList.h. DONTBUILD 2012-06-01 10:32:14 -04:00
Ginn Chen
ab480327da Bug 758494 Make double conversion built with Solaris Studio compiler r=jwalden 2012-06-01 17:49:33 +08:00
Benoit Jacob
74a0310077 Bug 758396 - Let MFBT LinkedList allow const - r=jlebar 2012-05-29 14:44:31 -04:00
Rafael Ávila de Espíndola
2b6dcbbad9 Bug 759208 - CheckedInt.h depends on undefined value of signed arithmetic. r=bjacob. 2012-05-29 12:48:26 -04:00
Mike Hommey
96de05d930 Bug 756965 - Allow mozilla::ThreadLocal to store integer types smaller than, or as large as, a pointer. r=Waldo 2012-05-22 08:43:55 +02:00
Mike Hommey
1c4217e2eb Bug 750620 - Declare double conversion correctness for more architectures. r=nfroyd 2012-05-22 08:38:44 +02:00
Gervase Markham
ca171eec44 Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00