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

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

Issue 2552993002: Rename activeDOMObjectsAreStopped to isContextDestroyed (Closed)
Patch Set: Created 4 years 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
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())

Powered by Google App Engine
This is Rietveld 408576698