Weird behaviour of CachingObserversManager when no observer registered

NEW
Unassigned

Status

()

6 years ago
6 years ago

People

(Reporter: chiajung, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

6 years ago
If I never register a observer, I will always get an unreasonable value from CachingObserversManager::GetCurrentInformation().

For example, if I do not register a ScreenConfigurationObserver from a content process and occasionally call hal::GetCurrentScreenConfiguration(). The return value would be fixed to the state when I first call to it. No matter what the real orientation is.

This can only happen if I use these HAL functions from C++ code (e.g. from Gecko). Since there is no permission check or no warning. When I did that, I expect it should returns the up-to-date value, but it didn't.

I think we may need some kind of warning or have to prohibit such usage in an explicit way.
Component: General → Hardware Abstraction Layer (HAL)
OS: Gonk (Firefox OS) → All
Product: Boot2Gecko → Core
Hardware: ARM → All
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.