Closed Bug 1156407 Opened 5 years ago Closed 5 years ago

clean up nsTimerImpl a little bit

Categories

(Core :: XPCOM, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: froydnj, Assigned: froydnj)

Details

Attachments

(3 files)

No description provided.
We have better, C++-ier ways of doing compile-time assertions now.
Attachment #8594892 - Flags: review?(continuation)
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.
Attachment #8594893 - Flags: review?(continuation)
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.
Attachment #8594894 - Flags: review?(continuation)
Comment on attachment 8594892 [details] [diff] [review]
part 1 - use static_assert instead of PR_STATIC_ASSERT

Review of attachment 8594892 [details] [diff] [review]:
-----------------------------------------------------------------

With this, there's only one remaining use of PR_STATIC_ASSERT in xpcom/, in /xpcom/string/nsTSubstring.cpp.  Feel free to fix that at the same time.  Or not.
Attachment #8594892 - Flags: review?(continuation) → review+
Comment on attachment 8594893 [details] [diff] [review]
part 2 - make CALLBACK_TYPE enum a private implementation detail of nsTimerImpl

Review of attachment 8594893 [details] [diff] [review]:
-----------------------------------------------------------------

Yay
Attachment #8594893 - Flags: review?(continuation) → review+
Comment on attachment 8594894 [details] [diff] [review]
part 3 - get rid of NS_NewTimer

Review of attachment 8594894 [details] [diff] [review]:
-----------------------------------------------------------------

Weird.
Attachment #8594894 - Flags: review?(continuation) → review+
You need to log in before you can comment on or make changes to this bug.