Closed Bug 1240330 Opened 7 years ago Closed 7 years ago

mozAlarm debug messages are turned on

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox43 --- unaffected
firefox44 --- affected
firefox45 --- affected
firefox46 --- affected
firefox47 --- fixed

People

(Reporter: danny, Assigned: fabrice)

References

Details

Attachments

(1 file, 1 obsolete file)

In bug 1181489, we turned on debug messages in AlarmService to diagnose a bug (here: https://bugzilla.mozilla.org/show_bug.cgi?id=1181489#c10 ). That bug is now fixed, but the debug switch wasn't flipped back, so Firefox (and others) are emitting unnecessary console messages whenever anything uses an alarm.

This one line patch turns it back off.
Why is the alarm API being loaded at all in Firefox?
Flags: needinfo?(felash)
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #1)
> Why is the alarm API being loaded at all in Firefox?

Tim maybe this question is for you.
Flags: needinfo?(tihuang)
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #1)
> Why is the alarm API being loaded at all in Firefox?

I don't know either.

> This one line patch turns it back off.

Good, but actually we still have little issues with mozAlarm and it would help keeping them... I don't have the bug numbers in my head right now but I can look got them if we really need it.

Of course we don't need them in Firefox at all, only in B2G.
Flags: needinfo?(felash)
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #1)
> Why is the alarm API being loaded at all in Firefox?

The simple answer of this question is that It would be nice for an API could be used in any platform. Thus, at first place, the design of Alarm API supports different hals, Gonk[1], android[2], fallback[3]. However, the behavior of the Alarm might be different due to the implementation of the hal. But it is good that you can use the same API in different platforms. So the alarm API has been loaded at all in Firefox.

[1] https://dxr.mozilla.org/mozilla-central/source/hal/gonk/GonkHal.cpp#1180
[2] https://dxr.mozilla.org/mozilla-central/source/hal/android/AndroidAlarm.cpp#45
[3] https://dxr.mozilla.org/mozilla-central/source/hal/fallback/FallbackAlarm.cpp#54
Flags: needinfo?(tihuang)
The requestsync API uses mozAlarms.  I expect nothing shipped in Firefox currently uses it.  However, the BackgroundSync implementation at bug 1217544 that will ship may end up needing mozAlarms?  (Unless it ignores use of wake-locks and the HAL to perform wakeup and instead just uses nsITimer.  Given FxOS disappearing and bkelly's assertion in that bug that the HAL mapping might not be right for FxOS, maybe it won't/shouldn't be used.)
Attached patch alarm-log.patchSplinter Review
Kyle, it's shipped on desktop because the push api uses it in PushService.jsm
Assignee: nobody → fabrice
Attachment #8708727 - Attachment is obsolete: true
Attachment #8716647 - Flags: review?(khuey)
https://hg.mozilla.org/mozilla-central/rev/c3c7ed2d2d0b
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.