Граф коммитов

71 Коммитов

Автор SHA1 Сообщение Дата
Eric Rahm 5b38c55967 Bug 1174785 - Part 2: Convert xpcom over to LogModule. r=froydnj
--HG--
extra : rebase_source : 58d3b32bd0174f2540512cef810cafdd3556ef6b
2015-10-19 12:50:14 -07:00
Nicholas Nethercote f429eae6a5 Bug 1203427 (part 5) - Add logging of timer firings. r=froydnj. 2015-09-10 00:50:51 -07:00
Nicholas Nethercote 886074f2e3 Bug 1203427 (part 3) - Change order of InitCommon() arguments. r=froydnj.
This makes the order of |aDelay| and |aType| match those of the InitWith*()
functions.

I've made this change because the inconsistency tripped me up during the
development of part 4.

--HG--
extra : rebase_source : 7d49f3f643e76955ea3de57e0954deb22cda3ddf
2015-09-14 15:57:17 -07:00
Byron Campen [:bwc] e145322168 Bug 1059572 - Part 1: Move PostTimerEvent to TimerThread to allow TimerThread's monitor to protect it. r=nfroyd
--HG--
extra : rebase_source : ec9623818cd1a5f3a2665a1c4af4be7869c0dec3
2015-07-22 12:39:34 -05:00
Nathan Froyd 4d01d51096 Bug 1178363 - make nsTimerImpl::GetGeneration a private method; r=poiru
Since GetGeneration() is only called by nsTimerEvent, it doesn't need to
be public.
2015-06-29 13:09:11 -04:00
Nathan Froyd ed7e987ecb Bug 1178363 - make nsTimerImpl::PostTimerEvent a private method; r=poiru
PostTimerEvent is only called by the timer thread, which is already able
to access private members of nsTimerImpl; there's no reason for
PostTimerEvent to be public.
2015-06-29 10:33:30 -04:00
Nathan Froyd 889fc1ad61 Bug 1178363 - make MOZ_TASK_TRACER-dependent bits of nsTimerImpl private; r=poiru
GetTracedTask() is only called from nsTimerImpl itself, so it doesn't
need to be public.  GetTLSTraceInfo() is called from the timer thread,
which has access to our private members already.
2015-06-18 12:02:23 -04:00
Nathan Froyd 4fea06a3a3 Bug 1178363 - make nsTimerImpl::Fire a private method; r=poiru
This method is only called by nsTimerEvent, which is an implementation
detail of nsTimerImpl.
2015-06-18 12:00:56 -04:00
Nathan Froyd 22b75ae28f Bug 1178363 - make nsTimerImpl::SetDelayInternal a private method; r=poiru
Nothing outside nsTimerImpl uses it, and with a name like
"SetDelayInternal", nothing should.
2015-06-17 21:40:18 -04:00
Shelly Lin 4eff0a1842 Bug 1113562 - Expected delay time of tasks should not be the latency of those kind. r=sinker
--HG--
extra : rebase_source : b5e012fb6570e87270a0924fbe395dc56e6242ec
2015-06-16 10:57:19 +08:00
Michael Layzell ab4019ac55 Bug 1168170 - Mark reference counted members of nsTimerImpl::mCallback as MOZ_OWNING_REF. r=froydnj 2015-05-28 10:14:00 -04:00
Eric Rahm 4879ae86f4 Bug 1165518 - Part 2: Replace prlog.h with Logging.h. rs=froydnj 2015-05-19 11:15:34 -07:00
Eric Rahm 6417f13e09 Bug 1162242 - Part 2: Remove DEBUG_TIMERS. r=froydnj
Now that PR_LOGGING is always defined DEBUG_TIMERS will always be set. It can
now be removed.
2015-05-07 09:43:36 -07:00
Eric Rahm 645b42df1f Bug 1162242 - Part 1: Remove instances of #ifdef PR_LOGGING. r=froydnj
PR_LOGGING is now always defined, we can remove #ifdefs checking for it.
2015-05-07 09:43:35 -07:00
Nathan Froyd 7fbbaf9fde Bug 1156407 - part 3 - get rid of NS_NewTimer; r=mccr8
It's never called.  We could replace a few do_CreateInstance/InitWithFuncCallback
pairs with NS_NewTimer, but I don't think it's worth doing that ahead of a "stop
using do_CreateInstance for all timer instances" effort.
2015-04-20 14:21:01 -04:00
Nathan Froyd 8af565d0f7 Bug 1156407 - part 2 - make CALLBACK_TYPE enum a private implementation detail of nsTimerImpl; r=mccr8
The CALLBACK_TYPE enum doesn't need to be exposed outside of
nsTimerImpl, so move it inside the class definition.  While we're doing
this, let's C++-ify the enum definition and give the members
non-shouting names.
2015-04-20 14:08:57 -04:00
Nathan Froyd 880dd42a14 Bug 1156407 - part 1 - use static_assert instead of PR_STATIC_ASSERT; r=mccr8
We have better, C++-ier ways of doing compile-time assertions now.  Fold in the
nsTSubstring.cpp change in passing, since mccr8 suggested it in his review.
2015-04-20 13:56:46 -04:00
Ehsan Akhgari 883849ee32 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -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 MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Ehsan Akhgari f32bb086bc Bug 1117035 - Mark virtual overridden functions as MOZ_OVERRIDE in XPCOM; r=froydnj 2015-01-05 11:25:41 -05:00
Gina Yeh d33f31e6be Bug 1089514, Patch 1: Some traced tasks/runnables have record of dispatch, but no records of execution, r=thinker.
---
 tools/profiler/TracedTaskCommon.cpp |   19 +++++--------------
 tools/profiler/TracedTaskCommon.h   |   12 ++++++++----
 xpcom/threads/TimerThread.cpp       |    2 ++
 xpcom/threads/nsTimerImpl.cpp       |    3 +++
 xpcom/threads/nsTimerImpl.h         |    2 +-
 5 files changed, 19 insertions(+), 19 deletions(-)
2014-11-04 17:42:03 +08:00
Eric Rahm 8d715a7fe4 Bug 806819 - Part 3: Remove redundant FORCE_PR_LOG entries. r=ehsan 2014-10-08 13:17:32 -07:00
Wes Kocher 445e1466e9 Backed out 5 changesets (bug 806819) for WinXP test failures on a CLOSED TREE
Backed out changeset 009ae35b0c67 (bug 806819)
Backed out changeset 5a57f87f5061 (bug 806819)
Backed out changeset f06cd735b5b3 (bug 806819)
Backed out changeset e25a2a8d4af4 (bug 806819)
Backed out changeset 70a167982c3f (bug 806819)
2014-10-06 16:32:50 -07:00
Eric Rahm 80d2b8bba6 Bug 806819 - Part 3: Remove redundant FORCE_PR_LOG entries. r=ehsan
--HG--
extra : rebase_source : c96eea1c12ea8c19314393f0e8b4b57a4316a61d
2014-10-06 13:08:20 -07:00
Birunthan Mohanathas 16471161bb Bug 1046841 - Fix more style violations in previously touched .h files in xpcom/. r=froydnj 2014-08-25 12:17:24 -07:00
Birunthan Mohanathas c9fb2c0d48 Bug 1022456 - Fix modelines in xpcom/{base,glue,io,string,threads}/. r=froydnj 2014-06-30 08:39:45 -07:00
Byron Campen [:bwc] 123de17a5e Bug 1024765 - Part 2: Make refcounting logic around PostTimerEvent more explicit. r=bz 2014-06-16 14:13:04 -07:00
Jonathan Watt b73bc43c94 Bug 1016680, part 5 - Report the memory used by PresShell::mCaret. r=dbaron 2014-06-22 23:02:59 +01:00
Robert O'Callahan cbb8fdebfc Bug 1015664. Part 1: Remove NS_HIDDEN_() usage. r=bsmedberg 2014-06-03 00:08:21 +12:00
Birunthan Mohanathas 67dad11bae Bug 995730 - Convert xpcom/threads/ to Gecko style. r=froydnj
--HG--
extra : rebase_source : 1f6f179f44db87f55ebfe5d855192adfad7d1b74
2014-05-27 10:15:35 +03:00
Shelly Lin 6437f8163e Bug 908995 - Part 2: Track runnables, tasks and timer events with TaskTracer. r=khuey. 2014-03-27 16:49:06 +08:00
Joshua Cranmer 1a6dffc73f Bug 884061 - Part 3y: Use NS_DECL_THREADSAFE_ISUPPORTS in xpcom/, r=bsmedberg
--HG--
extra : rebase_source : d54f6973e3ff859207115013e8361781769ffc76
2013-07-18 21:31:26 -05:00
Daniel Holbert aa087f4637 Bug 849086: Remove unused *_CLASSNAME defines. r=bsmedberg 2013-03-15 10:52:10 -07:00
Avi Halachmi 40a88976c3 Bug 590422: Remove delay line filter from timer thread. r=bz 2013-02-20 20:21:09 +02:00
Boris Zbarsky 5aa03620ad Bug 618479 part 2. Use binary, not linear, search to determine timer insertion locations. r=brendan 2013-02-13 10:11:53 -05:00
Nathan Froyd 4c61ef9ec5 Bug 806618 - rewrite PR_NewLogModule calls to not generate static initializers; r=ehsan 2012-10-29 19:32:10 -04:00
Ehsan Akhgari e368dc9c85 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
Ehsan Akhgari df3797a6e7 Bug 758992 - Make the classes which use the XPCOM nsISupports implementation macros final, to avoid the warning about deleting using a pointer to a base class with virtual functions and no virtual dtor (XPCOM parts); r=bsmedberg 2012-06-05 19:51:58 -04:00
Gervase Markham 82ff7027aa Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Michael Wu d2b70213ac Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones
--HG--
rename : tools/trace-malloc/bloatblame.c => tools/trace-malloc/bloatblame.cpp
2011-09-28 23:19:26 -07:00
Boris Zbarsky 2d337f0522 Bug 650379. Add a new XPCOM timer type that is like TYPE_REPEATING_PRECISE but does not swamp the event queue if the callback takes longer than the timer interval to run. r=cjones, sr=brendan
This implements proposal 3 from bug 650379 comment 13.  The main difference
between TYPE_REPEATING_PRECISE and TYPE_REPEATING_PRECISE_CAN_SKIP is to not
AddTimer the REPEATING_PRECISE_CAN_SKIP timer until after the callback has run;
this guarantees that no more timer events will be posted until after the
callback finishes executing.  A secondary change is to make
REPEATING_PRECISE_CAN_SKIP timers advance their firing time to mDelay from when
PostTimerEvent is called, not mDelay from the old mTimeout.  While this arguably
makes them less precise, the alternative is that if a timer is significantly
delayed for some reason (e.g. because the user puts the computer to sleep for a
while) it will then fire a whole bunch of times to "catch up" to where it's
supposed to be, advancing its firing time by mDelay at a time.  That seems
undesirable.

An alternate approach would have been to readd the timer from inside
PostTimerEvent, but only if we're not in the middle of firing the timer. That
would allow more precise timers in the case when the callback is not taking too
long, but still handle gracefully the case when the callback is
slow. Unfortunately this falls down if something _else_ is hogging the main
thread event loop (e.g. some other timer has a slow callback, or whatever); in
that case we would post multiple events for the one precise timer while the
event-loop-hogging operation is running. So I don't think we should do that.
2011-04-28 19:33:52 -04:00
Boris Zbarsky 76b9b28798 Bug 558306 part 2. Switch XPCOM timers to TimeDuration/TimeStamp. r=cjones, sr=brendan 2010-07-15 09:59:24 -04:00
Boris Zbarsky 6a042ef8f4 Backing out rev b567a93a5086 (bug 558306) to fix test orange 2010-07-15 13:49:28 -04:00
Boris Zbarsky 25be38b901 Bug 558306 part 2. Switch XPCOM timers to TimeDuration/TimeStamp. r=cjones, sr=brendan 2010-07-15 09:59:24 -04:00
Ben Turner b4b173d212 Bug 443877 - "Need a way to point timers at a different event target". r=bsmedberg. 2008-07-24 10:20:33 -07:00
jwalden@mit.edu 2b823be5c5 Bug 420521 - Leaking nsThread and nsTimerImpl running full set of Mochitests. This fixes the last refcounted leak on OS X Mochitests! Zounds! r=brendan, sr=dbaron, a=blocker 2008-03-10 14:05:46 -07:00
vladimir@pobox.com 15e811c57a b=417115, animated image causes recursion during shutdown ; r=stuart 2008-02-13 22:51:06 -08:00
sayrer@gmail.com 1e3ed80af6 Bug 401137. Silence ASSERTION: RefreshURIList timer callbacks should only be RefreshTimer objects. Docshell expects to be able to getCallback during a Timer fire. r=bzbarsky, sr=brendan, a=mconnor 2007-10-30 08:56:59 -07:00
sayrer@gmail.com c3df88ea3b Bug 330128. Calling cancel() on a timer doesn't drop ref to the callback. r=brendan, sr=bzbarsky, a=beltzner 2007-10-24 12:11:41 -07:00
darin%meer.net 0f94d8ab55 fixes bug 333167 "remove idle timer / timer manager after bug 326273 is fixed" r=pavlov 2006-06-29 00:01:58 +00:00
darin%meer.net 0318b8c707 landing patch for bug 326273 "Implement nsIThreadManager" (Mac portions by Mark Mentovai) with reviews from bienvenu, bsmedberg, bzbarsky, josh, roc, and ssieb 2006-05-10 17:30:15 +00:00