| Index: third_party/WebKit/Source/modules/battery/BatteryManager.cpp
|
| diff --git a/third_party/WebKit/Source/modules/battery/BatteryManager.cpp b/third_party/WebKit/Source/modules/battery/BatteryManager.cpp
|
| index eb9a0ad869f68fa9e3c1b48f06a38bdfbdd93d93..8d0524b569e19e715413710a51feed3dca30c6a9 100644
|
| --- a/third_party/WebKit/Source/modules/battery/BatteryManager.cpp
|
| +++ b/third_party/WebKit/Source/modules/battery/BatteryManager.cpp
|
| @@ -31,8 +31,7 @@ ScriptPromise BatteryManager::startRequest(ScriptState* scriptState) {
|
| this, BatteryProperty::Ready);
|
|
|
| // If the context is in a stopped state already, do not start updating.
|
| - if (!getExecutionContext() ||
|
| - getExecutionContext()->activeDOMObjectsAreStopped()) {
|
| + if (!getExecutionContext() || getExecutionContext()->isContextDestroyed()) {
|
| m_batteryProperty->resolve(this);
|
| } else {
|
| m_hasEventListener = true;
|
| @@ -73,7 +72,7 @@ void BatteryManager::didUpdateData() {
|
| Document* document = toDocument(getExecutionContext());
|
| DCHECK(document);
|
| if (document->activeDOMObjectsAreSuspended() ||
|
| - document->activeDOMObjectsAreStopped())
|
| + document->isContextDestroyed())
|
| return;
|
|
|
| if (m_batteryStatus.charging() != oldStatus.charging())
|
|
|