get rid of the static constructor for hal/Hal.cpp

RESOLVED FIXED in Firefox 47

Status

()

defect
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: tbsaunde, Assigned: tbsaunde)

Tracking

unspecified
mozilla47
Points:
---

Firefox Tracking Flags

(firefox47 fixed)

Details

Attachments

(6 attachments)

Assignee

Description

3 years ago
making the ctors for the static objects in this file constexpr is awkward because we'd need to make a static TArray class.  So it seems easier to hide the statics inside functions that lazily create them when needed and return
 a reference to them.  An additional benefit of doing this is that we can make sure all accesses to the object happen on the main thread. Please enter the summary (first line) and description (other lines). Lines
Comment on attachment 8721413 [details] [diff] [review]
make sBatteryObservers a function static

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

LGTM
Attachment #8721413 - Flags: review?(dhylands) → review+
Attachment #8721414 - Flags: review?(dhylands) → review+
Assignee: nobody → tbsaunde+mozbugs
Attachment #8721415 - Flags: review?(dhylands) → review+
Attachment #8721416 - Flags: review?(dhylands) → review+
Attachment #8721417 - Flags: review?(dhylands) → review+
Comment on attachment 8721418 [details] [diff] [review]
make sSystemTimezoneChangeObservers a function static

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

I like the main-thread check (for all of these). Excellent.
Attachment #8721418 - Flags: review?(dhylands) → review+
You need to log in before you can comment on or make changes to this bug.