Index: third_party/WebKit/Source/modules/battery/NavigatorBattery.cpp |
diff --git a/third_party/WebKit/Source/modules/battery/NavigatorBattery.cpp b/third_party/WebKit/Source/modules/battery/NavigatorBattery.cpp |
index 5f6423f1c51a6e9bbb419a0c4de6c0893311d7d1..e0a29820d7c19f144b802df7ea4bf7ab3f4074a0 100644 |
--- a/third_party/WebKit/Source/modules/battery/NavigatorBattery.cpp |
+++ b/third_party/WebKit/Source/modules/battery/NavigatorBattery.cpp |
@@ -4,7 +4,6 @@ |
#include "modules/battery/NavigatorBattery.h" |
-#include "core/dom/ExecutionContext.h" |
#include "core/frame/LocalFrame.h" |
#include "modules/battery/BatteryManager.h" |
@@ -19,10 +18,10 @@ ScriptPromise NavigatorBattery::getBattery(ScriptState* script_state, |
} |
ScriptPromise NavigatorBattery::getBattery(ScriptState* script_state) { |
- if (!battery_manager_) { |
+ if (!battery_manager_) |
battery_manager_ = |
- BatteryManager::Create(ExecutionContext::From(script_state)); |
- } |
+ BatteryManager::Create(script_state->GetExecutionContext()); |
+ |
return battery_manager_->StartRequest(script_state); |
} |