Index: Source/modules/battery/BatteryManager.cpp |
diff --git a/Source/modules/battery/BatteryManager.cpp b/Source/modules/battery/BatteryManager.cpp |
index a100fe59d4725c5a192a58003ca75cce92b25f1a..57cfa22ae62565d02832a0bc39f8f6625ef52e19 100644 |
--- a/Source/modules/battery/BatteryManager.cpp |
+++ b/Source/modules/battery/BatteryManager.cpp |
@@ -44,6 +44,7 @@ ScriptPromise BatteryManager::startRequest(ScriptState* scriptState) |
if (m_state == Resolved) { |
// FIXME: Consider returning the same promise in this case. See crbug.com/385025. |
m_resolver->resolve(this); |
+ m_resolver = nullptr; |
} else if (m_state == NotStarted) { |
m_state = Pending; |
m_hasEventListener = true; |
@@ -85,6 +86,7 @@ void BatteryManager::didUpdateData() |
ASSERT(m_resolver); |
m_state = Resolved; |
m_resolver->resolve(this); |
+ m_resolver = nullptr; |
return; |
} |