New issue
Advanced search Search tips

Issue 850619 link

Starred by 2 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Unify PlatformEventController creation

Project Member Reported by oksamyt@chromium.org, Jun 7 2018

Issue description

Currently, there are 5 subclasses of PlatformEventController:

DeviceMotionController
DeviceOrientationController
BatteryManager
NavigatorGamepad
ScreenOrientationControllerImpl

Some of them get initialized with a nullptr Document*, which can lead to incorrect behaviour when the document is expected to have a valid frame.

Changes need to be made to initialize all the subclasses in a consistent way (https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/battery/navigator_battery.idl has an example of passing ScriptState which can then be used to get a frame).

More info about potential nullptr cases at https://crrev.com/c/1081432/1/third_party/blink/renderer/core/frame/platform_event_dispatcher.h#17
 
Description: Show this description

Sign in to add a comment