Commit Graph

159 Commits

Author SHA1 Message Date
Terrence Cole
063f398bc1 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
b0aff8fadb Backout 754a1efb5b37 for bustage on a CLOSED TREE 2012-10-08 15:42:39 -07:00
Terrence Cole
2eb31b77bd 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
1e809c4aa8 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
4d35e2a589 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
8b00ef4f80 Bug 792689 - Add some double negations to the macros in Likely.h; r=Waldo 2012-09-20 13:17:05 +02:00
Kyle Huey
f4a7f15ceb 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
280ff59cf2 Bug 792689 - Add some double negations to the macros in Likely.h; r=Waldo 2012-09-20 13:17:05 +02:00
Jeff Muizelaar
00587c07b1 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
e0f22a3469 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
8c296bbcd4 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
9eace88081 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
62a0f3d446 Bug 781627 - Copy security/nss/lib/freebl/sha_fast.c to mfbt. r=jlebar. 2012-08-20 15:01:55 -04:00
Aryeh Gregor
75a8b11012 Bug 782919 - Add zero-arg constructor to enum class workaround; r=ehsan 2012-08-16 14:58:12 +03:00
Ed Morley
7858e8e170 Backout 19ec214f806c (bug 782916), 88b802832f52 (bug 782919), f16429aa2210 (bug 780474) for Android build failures 2012-08-17 12:25:12 +01:00
Aryeh Gregor
5b014008d1 Bug 782919 - Add zero-arg constructor to enum class workaround; r=ehsan 2012-08-16 14:58:12 +03:00
Aryeh Gregor
51bc760936 Bug 751554 part 2 - Support strongly-typed enums in MFBT; r=ehsan 2012-08-01 15:19:00 +03:00
Aryeh Gregor
83129c8f26 Bug 751554 part 1 - Support explicit underlying enum types in MFBT; r=cjones 2012-08-05 12:11:24 +03:00
Nicholas Nethercote
015b5205c6 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
cc3eef8d15 Bug 776429: Unify scattered M_PI definitions into mfbt/Constants.h r=dRdR 2012-08-06 13:32:11 -07:00
Mike Hommey
c1b35e7b2a Bug 774032 bonus - Use @DEPTH@ and @relativesrcdir@ in Makefile.in. r=ted 2012-08-04 20:26:44 +02:00
Benoit Jacob
15b31c23df Bug 768538 - CheckedInt: HasSignBit should return bool - r=Ms2ger 2012-07-08 11:44:22 -04:00
Benoit Jacob
8c74d60e26 Bug 768538 - CheckedInt: code simplification; remove the separate operator/ implementation - r=Ms2ger 2012-07-08 11:25:24 -04:00
Benoit Jacob
48592034dc Bug 768570 - Fix all the warnings in CheckedInt - r=jwalden 2012-07-05 10:13:31 -04:00
Benoit Jacob
184c216c48 Bug 768538 - 2/2 - Fix undefined behavior in the CheckedInt unit test - r=jwalden 2012-07-05 10:13:23 -04:00
Benoit Jacob
457f2bf3b9 Bug 768538 - 1/2 - Fix undefined behavior in CheckedInt - r=jwalden 2012-07-05 10:13:13 -04:00
Jeff Walden
1128bafac5 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
d29b566ac3 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
f6138fbe65 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
0e736a941f 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
602c48c764 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
976e703db3 Backout 1c5a8d617bff (bug 765990), 617cb36ead59, b3067d05a76a (bug 760995), 79f9a61a1e43 (bug 426163) for bustage 2012-06-21 10:00:36 +01:00
Jeff Walden
c37e657ef7 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
f1408aaee2 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
9383c3b0c7 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
452db7706c 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
fb7e6c0e93 Bug 763000 - Remove MOZ_Assert. r=Ms2ger, r=terrence, r=ted 2012-06-07 14:41:11 -07:00
Jeff Walden
56d89732b5 Fix a couple style nits missed during review. Followup to bug 616262, r=sparky 2012-06-14 17:55:11 -07:00
Mike Hommey
7d23ff076d 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
4a95d2f73e 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
43b2c7abdd Style patrol to make everything conform to mfbt/STYLE. No bug, r=sparky 2012-06-03 20:36:43 -07:00
Jeff Walden
2997d7619b 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
9a14f9092a Bug 758337 - Fix mistake in comment in mfbt/LinkedList.h. DONTBUILD 2012-06-01 10:32:14 -04:00
Ginn Chen
7fda715d03 Bug 758494 Make double conversion built with Solaris Studio compiler r=jwalden 2012-06-01 17:49:33 +08:00
Benoit Jacob
f88c920c2c Bug 758396 - Let MFBT LinkedList allow const - r=jlebar 2012-05-29 14:44:31 -04:00
Rafael Ávila de Espíndola
cf3f87b0ac Bug 759208 - CheckedInt.h depends on undefined value of signed arithmetic. r=bjacob. 2012-05-29 12:48:26 -04:00
Mike Hommey
6dfe5aecce 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
b119d9f76e Bug 750620 - Declare double conversion correctness for more architectures. r=nfroyd 2012-05-22 08:38:44 +02:00
Gervase Markham
87620f5676 Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Ehsan Akhgari
21db48ba20 Bug 753119 - Add ThreadLocal to mfbt - r=jwalden
... because nobody likes to use the NSPR TLS support.
2012-05-09 16:54:33 -04:00