Do not (re)start NavigatorGamepad updating once detached.

Following r187750, NavigatorGamepad uses DOMWindowProperty::frame()
to access its window and document, dispatching and handling events
via those when activated and receiving platform event updates.

With Oilpan enabled, a DOMWindowProperty instance will be informed
of frame & document detachment via willDetachGlobalObjectFromFrame(),
with the frame remaining alive until the next GC sweep. Without
Oilpan, frame destruction is synchronous.

Consequently, a NavigatorGamepad with a now-detached frame() should
not reactivate itself, as the weak frame() reference will become
null once the next GC has struck. NavigatorGamepad relies on
frame() being non-null when activated.

Insist on the frame being non-detached to (re)activate. The
difference in behavior from the previous check is only observable
with Oilpan enabled, hence no need to make it suitably conditional.

R=haraken
BUG=340522

Review URL: https://codereview.chromium.org/828983002

git-svn-id: svn://svn.chromium.org/blink/trunk@187811 bbb929c8-8fbe-4397-9dbb-9b2b20218538
1 file changed
tree: c17a9804412945e0aad52322082d08c44191a18c
  1. third_party/