| 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 8fdf4e88a974353762890c2ecfa78c1e0fc2f160..fbcf9639f411e8b48ac5b8b97b03a5004801180c 100644
|
| --- a/third_party/WebKit/Source/modules/battery/BatteryManager.cpp
|
| +++ b/third_party/WebKit/Source/modules/battery/BatteryManager.cpp
|
| @@ -109,14 +109,14 @@ void BatteryManager::resume() {
|
|
|
| void BatteryManager::contextDestroyed() {
|
| m_hasEventListener = false;
|
| - m_batteryProperty.clear();
|
| + m_batteryProperty = nullptr;
|
| stopUpdating();
|
| }
|
|
|
| bool BatteryManager::hasPendingActivity() const {
|
| // Prevent V8 from garbage collecting the wrapper object if there are
|
| // event listeners attached to it.
|
| - return hasEventListeners();
|
| + return getExecutionContext() && hasEventListeners();
|
| }
|
|
|
| DEFINE_TRACE(BatteryManager) {
|
|
|