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

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

Issue 2815313002: Reland of Move ScriptState::GetExecutionContext (Part 5) (Closed)
Patch Set: Created 3 years, 8 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
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 41fbf315887d1611f1b0a916d4b57b2b6572523c..4e50bbae802c74ecc1b09678300b1c2d7baa1bc5 100644
--- a/third_party/WebKit/Source/modules/battery/BatteryManager.cpp
+++ b/third_party/WebKit/Source/modules/battery/BatteryManager.cpp
@@ -6,6 +6,7 @@
#include "core/dom/DOMException.h"
#include "core/dom/Document.h"
+#include "core/dom/ExecutionContext.h"
#include "core/events/Event.h"
#include "modules/battery/BatteryDispatcher.h"
#include "platform/wtf/Assertions.h"
@@ -26,8 +27,8 @@
ScriptPromise BatteryManager::StartRequest(ScriptState* script_state) {
if (!battery_property_) {
- battery_property_ = new BatteryProperty(script_state->GetExecutionContext(),
- this, BatteryProperty::kReady);
+ battery_property_ = new BatteryProperty(
+ ExecutionContext::From(script_state), this, BatteryProperty::kReady);
// If the context is in a stopped state already, do not start updating.
if (!GetExecutionContext() || GetExecutionContext()->IsContextDestroyed()) {

Powered by Google App Engine
This is Rietveld 408576698