Closed Bug 1249738 Opened 5 years ago Closed 5 years ago

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

Categories

(Core :: Hardware Abstraction Layer (HAL), defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: tbsaunde, Assigned: tbsaunde)

Details

Attachments

(6 files)

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.