| Index: Source/modules/battery/BatteryManager.cpp
|
| diff --git a/Source/modules/battery/BatteryManager.cpp b/Source/modules/battery/BatteryManager.cpp
|
| index e2a9c77466eca0d935e91a049377cb9c1ec89f16..79d8e262aa58b9069bc3427b93a94a5305a103cb 100644
|
| --- a/Source/modules/battery/BatteryManager.cpp
|
| +++ b/Source/modules/battery/BatteryManager.cpp
|
| @@ -43,9 +43,8 @@ ScriptPromise BatteryManager::startRequest(ScriptState* scriptState)
|
| m_resolver = ScriptPromiseResolver::create(scriptState);
|
| ScriptPromise promise = m_resolver->promise();
|
|
|
| - ASSERT(executionContext());
|
| // If the context is in a stopped state already, do not start updating.
|
| - if (m_state == Resolved || executionContext()->activeDOMObjectsAreStopped()) {
|
| + if (m_state == Resolved || !executionContext() || executionContext()->activeDOMObjectsAreStopped()) {
|
| // FIXME: Consider returning the same promise in this case. See crbug.com/385025.
|
| m_state = Resolved;
|
| m_resolver->resolve(this);
|
|
|