Commit Graph

68 Commits

Author SHA1 Message Date
Andrew McCreight
eec6dea9ff Bug 1151541, part 2 - Fix mode lines in xpcom/. r=froydnj 2015-04-09 10:25:05 -07:00
Jonathan Watt
4316694605 Bug 1147491, part 2 - Disable use of BaseTimeDuration::operator/ with floating point values. r=ehsan 2015-04-02 14:03:40 +01:00
Jonathan Watt
a127a18baf Bug 1147491 - Partially backout part 2 while figuring out B2G orange. r=orange CLOSED TREE 2015-04-01 12:05:02 +01:00
Jonathan Watt
f218ddd46e Bug 1147491, part 2 - Disable use of BaseTimeDuration::operator/ with floating point values. r=ehsan 2015-03-30 16:27:13 +01:00
Mason Chang
b49e57ebdb Bug 1127151. Part 4: Update TimeStamp::FromSystemTime with windows testing. r=kats 2015-02-13 17:17:28 +08:00
Ehsan Akhgari
b6e35bb4b4 Bug 1118486 - Part 1: Use = delete instead of MOZ_DELETE directly; r=Waldo
Most of this patch (with the exception of dom/bindings/Codegen.py) was
generated by the following bash script:

#!/bin/bash

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "*/.git*" \
       ! -wholename "obj-*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -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 MOZ_DELETE '= delete'
2015-01-08 23:19:05 -05:00
Mason Chang
a88f78597a bug 552020 Part 3: Enable Creation of mozilla::TimeStamp from system timestamps. r=roc 2014-11-18 13:28:42 -08:00
Brian Birtles
40b569b50a Bug 1073336 part 3a - Allow TimeStamp == and != operators to work with null timestamps; r=froydnj 2014-11-17 13:45:56 +09:00
Ryan VanderMeulen
57225618ce Backed out changesets a99bd0b3b075, a7fb851f823a, and 9fc2d99376cd (bug 552020) for non-unified bustage and OSX 10.6 tsvgr crashes.
CLOSED TREE
2014-11-14 15:57:35 -05:00
Mason Chang
97966e77aa Bug 552020. Part 3: Enable creation of mozilla::TimeStamp from system Timestamps. r=roc 2014-11-14 08:31:04 -08:00
Mason Chang
a4b08a413f Bug 1083530. Part 1 Create mozilla::TimeStamp constructor with system time param. r=roc 2014-10-29 13:36:51 -07:00
Brian Birtles
953d64c3f3 Bug 1039924 part 7 - Add unary minus operator to BaseTimeDuration; r=froydnj
This patch adds the unary minus operator so, for example, we can write:

  TimeDuration sinceBeforeYourSunBurnedHot = -TimeDuration::Forever();
2014-09-25 14:25:50 +09:00
Brian Birtles
c4e801e7cf Bug 1039924 part 4 - Fill out TimeDurationValueCalculator and use it; r=froydnj
This patch builds on the templatization from the previous patch to move
arithmetic on the mValue member of BaseTimeDuration to the ValueCalculator
template parameter.
2014-09-25 14:25:49 +09:00
Brian Birtles
99025a6c9b Bug 1039924 part 3 - Templatize TimeDuration so it can support different behaviors with regards to tick count arithmetic; r=froydnj
This patch prepares the way for having a separate StickyTimeDuration class
by factoring TimeDuration into a templated base class: BaseTimeDuration.
BaseTimeDuration takes a templated parameter, ValueCalculator, which is a helper
object that defines how various arithmetic operations are performed on its
mValue member (an int64_t count of ticks).

This patch does not actually define or use the ValueCalculator parameter yet but
simply performs the renaming and templatization.

With regards to the templatization, arithmetic operators are defined to take
objects with the same ValueCalculator template parameter (so that we don't, for
example, apply non-safe arithmetic to a StickyTimeDuration).
However, comparison operators are defined to also operate on objects with
a different ValueCalculator template parameter since comparison should be
independent of the type of arithmetic used.

Likewise, the constructor and assignment operator are defined to operate on
objects with a different ValueCalculator template parameter so that objects can
be converted from TimeDuration to StickyTimeDuration and vice-versa.
The constructor is marked as explicit, however, so that we don't silently
convert a StickyTimeDuration to a TimeDuration and unwittingly apply
non-safe arithmetic to a StickyTimeDuration.

TimeDuration is defined as a specialization of BaseTimeDuration that uses
TimeDurationValueCalculator as its ValueCalculator type.
TimeDurationValueCalculator is filled-in in a subsequent patch.
2014-09-25 14:25:49 +09:00
Brian Birtles
c668976a1d Bug 1039924 part 2 - Convert between Forever and Infinity when converting TimeDurations; r=froydnj
Now that the implementation of a number of TimeDuration methods have been
delegated to a separate TimeDurationPlatformUtils class, it is easier to add
consistent handling to the parameters passed to and from those methods.

This patch adds checks when converting between TimeDurations and doubles so that
Forever (represented by a tick count of INT64_MAX) is paired with
PositiveInfinity, and INT64_MIN is paired with NegativeInfinity.
2014-09-25 14:25:49 +09:00
Brian Birtles
01e071c1ca Bug 1039924 part 1 - Separate platform-dependent parts of TimeDuration into TimeDurationPlatformUtils; r=froydnj
In order to have different templated versions of TimeDuration we first split out
the platform-specific code so that this code doesn't need to concern itself with
templates (and because putting template code in .cpp files is messy).
2014-09-25 14:25:48 +09:00
Ehsan Akhgari
50bf9295df Bug 1045065 - Fix some bad implicit constructors in xpcom; r=froydnj 2014-07-28 13:19:06 -04:00
Birunthan Mohanathas
920e5a9c34 Bug 1022456 - Convert xpcom/ds/ to Gecko style. r=froydnj 2014-07-09 08:15:21 -07:00
Brian Birtles
9cd18959bd Bug 1004365 part 3b.1 - Add % operator to TimeDuration; r=froydnj 2014-06-11 14:19:08 +09:00
Brian Birtles
10b4d4aa45 Bug 1004365 part 2 - Add TimeDuration != operator; r=froydnj 2014-06-11 14:19:07 +09:00
Robert O'Callahan
9170085906 Bug 1015664. Part 1: Remove NS_HIDDEN_() usage. r=bsmedberg 2014-06-03 00:08:21 +12:00
Brian Birtles
314e088ee3 Bug 1016757 - Add TimeDuration::operator* (const uint64_t) const, i.e. accept an unsigned 64-bit integer as a multiplier; r=froydnj 2014-05-30 09:45:39 +09:00
Anthony Jones
f9b34b9e32 Bug 839911 - Add a convenient forever() time period constructor; r=roc 2013-12-06 16:21:39 +13:00
Gabriele Svelto
d48fd3d8ac Bug 906754 - Ensure that TimeStamp's static fields are initialized only once. r=froydnj 2013-10-28 20:50:09 +01:00
Ehsan Akhgari
7ee5f54d35 Bug 918105 - Minimize the #includes in xpcom/ds; r=bsmedberg 2013-09-19 15:31:21 -04:00
Nathan Froyd
e4dd440733 Bug 906149 - make no-arg TimeDuration constructor constexpr to avoid a static constructor; r=ehsan 2013-08-16 15:23:28 -04:00
Gabriele Svelto
e27e54667f Bug 852250 - When restarting recompute the process startup timestamp instead of using the timestamp stored it in MOZ_APP_RESTART during the shutdown procedure. r=nfroyd 2013-07-31 12:51:58 +02:00
Anthony Jones
d204b25403 Bug 864447 - Move timing tracking out of APZC; r=BenWa 2013-07-10 11:26:08 +12:00
Trevor Saunders
cbbd41bc09 bug 876515 - make the default constructor for TimeStamp{,Value} constexpr r=froydnj
I had to remove the assert in the windows TimeStampValue::TimeStampValue() so
it could be constexpr.  another option would be to make the constructors being
constexpr conditional on DEBUG, but that requires a couple ifdefs, and it just
seems simpler to make that constructor private and assume TimeStamp code itself
won't be so dumb as to pass that constructor a meaningful value expecting
something to be done with it.
2013-05-27 17:27:06 -04:00
Gabriele Svelto
c5cb74f8ec Bug 793735 - Make XRE_StartupTimelineRecord() generate TimeStamps and modify its callers to use the appropriate timers, r=nfroyd 2013-03-26 11:31:20 +01:00
Gabriele Svelto
8d6ecdb6a0 Bug 793735 - Add functionality to create TimeStamp instances representing the process creation time, r=nfroyd 2013-03-28 11:28:09 +01:00
Nathan Froyd
c51a8b0019 Backout 61e1edc0b6bf (bug 793735), 77014412cd4a (bug 793735), and 8c5aa269c3cd (bug 793735) for botching FHR data 2013-04-09 16:25:42 -04:00
Gabriele Svelto
dda7d72c6f Bug 793735 - Make XRE_StartupTimelineRecord() generate TimeStamps and modify its callers to use the appropriate timers, r=froydnj 2013-03-26 11:31:20 +01:00
Gabriele Svelto
12254c942f Bug 793735 - Add functionality to create TimeStamp instances representing the process creation time, r=froydnj 2013-03-28 11:28:09 +01:00
Avi Halachmi
c817d69e80 Bug 853398: Disable TimeDuration::operator* (double) using MOZ_DELETE. r=bz 2013-03-22 16:51:08 +01:00
Honza Bambas
f15437c70d Bug 827287 - make it possible to use TimeStamp without performance concerns (TimeStamp::NowLoRes), r=ehsan, sr=roc 2013-02-11 22:56:59 +01:00
Honza Bambas
b2f0520748 Bug 822490 - Radically simplify windows TimeStamp implementation, r=tellrob 2013-02-11 22:56:58 +01:00
Chris Peterson
34d009dfe8 Bug 829685 - Remove #include "prtypes.h" from some files that no longer use PR types. r=ehsan 2013-01-10 08:19:36 -08:00
Vladimir Vukicevic
9ff5ef25de b=731974, requestAnimationFrame generates too short/long frames (incl. bug 799242); r=bz,smaug,roc,ehsan 2012-12-11 17:15:32 -05:00
Ed Morley
6eb6a9b409 Backout 739aff49b8bb (bug 731974) for turning browser_586068-reload.js permaorange on WinXP 3 days ago 2012-10-08 10:57:12 +01:00
Vladimir Vukicevic
3a1848bba7 b=731974, requestAnimationFrame generates too short/long frames; r=bz,smaug,roc 2012-10-02 10:54:46 -04:00
Ed Morley
52216acaf5 Backout 16ae4d5d27d7 for mochitest-other failures in test_mousescroll.xul 2012-10-02 17:38:49 +01:00
Vladimir Vukicevic
57bcf02a8d b=731974, requestAnimationFrame generates too short/long frames; r=bz,smaug,roc 2012-10-02 10:54:46 -04:00
Isaac Aggrey
e496b51126 Bug 795351: Replace LL_MAXINT, LL_MININT, LL_MAXUINT with stdint versions; r=ehsan 2012-09-28 14:55:23 -05:00
Landry Breuil
994eaecaee Bug 785738 Part 1: Use INT64_MAX/MIN instead of LL_MAXINT/MININT constants. r=ehsan 2012-08-30 09:10:26 +02: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
David Zbarsky
1ab8257975 Bug 706179 Part 1: Add support for animations to the Layers API r=roc, dbaron, cjones 2012-07-31 10:28:20 -07:00
Mark Finkle
70a01196ec Backout 169ff207ed19, a34baed70c1b, f9ccdd490bd7, 39550ed860e6, 2194a2dd66b2, 908eb2e26843, a76e0a267f26 due to mobile viewport bustage (bug 778580) 2012-07-30 14:36:12 -04:00
David Zbarsky
12752872fe Bug 706179: Add support for animations to the Layers API r=roc, dbaron, cjones 2012-07-27 13:23:44 -07:00
Ed Morley
be8bf4beae Backout 1244b8a8e57a (bug 755084), 32d16d0f87c9 (bug 706179), 8548e016d4a9 (bug 768440), 697f5b87eae9 (bug 768440), 808fc2bd4e8c (bug 755084), 54b1484cd125 (bug 755084), 876726b632c0 (bug 706179) for xul android R3 failures 2012-07-25 16:37:04 +01:00