Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2196)

Unified Diff: Source/modules/battery/BatteryManager.cpp

Issue 622733002: ScriptPromiseResolver leaked resource when constructed on stopped context. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/core/v8/ScriptPromiseResolver.cpp ('k') | Source/modules/webmidi/NavigatorWebMIDI.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/battery/BatteryManager.cpp
diff --git a/Source/modules/battery/BatteryManager.cpp b/Source/modules/battery/BatteryManager.cpp
index 57cfa22ae62565d02832a0bc39f8f6625ef52e19..a100fe59d4725c5a192a58003ca75cce92b25f1a 100644
--- a/Source/modules/battery/BatteryManager.cpp
+++ b/Source/modules/battery/BatteryManager.cpp
@@ -44,7 +44,6 @@ 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;
@@ -86,7 +85,6 @@ void BatteryManager::didUpdateData()
ASSERT(m_resolver);
m_state = Resolved;
m_resolver->resolve(this);
- m_resolver = nullptr;
return;
}
« no previous file with comments | « Source/bindings/core/v8/ScriptPromiseResolver.cpp ('k') | Source/modules/webmidi/NavigatorWebMIDI.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698