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

Unified Diff: third_party/WebKit/Source/core/animation/Animation.cpp

Issue 2811863002: Move ScriptState::GetExecutionContext (Part 4) (Closed)
Patch Set: Fix Document.cpp 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/ElementAnimation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/animation/Animation.cpp
diff --git a/third_party/WebKit/Source/core/animation/Animation.cpp b/third_party/WebKit/Source/core/animation/Animation.cpp
index 2271bc053382bb79c19dc4916ededa6308443e8c..a8cde625b190a08b6d69bb111fce8eafd1febe61 100644
--- a/third_party/WebKit/Source/core/animation/Animation.cpp
+++ b/third_party/WebKit/Source/core/animation/Animation.cpp
@@ -37,6 +37,7 @@
#include "core/dom/DOMNodeIds.h"
#include "core/dom/Document.h"
#include "core/dom/ExceptionCode.h"
+#include "core/dom/ExecutionContext.h"
#include "core/dom/StyleChangeReason.h"
#include "core/dom/TaskRunnerHelper.h"
#include "core/events/AnimationPlaybackEvent.h"
@@ -629,8 +630,9 @@ void Animation::finish(ExceptionState& exception_state) {
ScriptPromise Animation::finished(ScriptState* script_state) {
if (!finished_promise_) {
- finished_promise_ = new AnimationPromise(
- script_state->GetExecutionContext(), this, AnimationPromise::kFinished);
+ finished_promise_ =
+ new AnimationPromise(ExecutionContext::From(script_state), this,
+ AnimationPromise::kFinished);
if (PlayStateInternal() == kFinished)
finished_promise_->Resolve(this);
}
@@ -639,7 +641,7 @@ ScriptPromise Animation::finished(ScriptState* script_state) {
ScriptPromise Animation::ready(ScriptState* script_state) {
if (!ready_promise_) {
- ready_promise_ = new AnimationPromise(script_state->GetExecutionContext(),
+ ready_promise_ = new AnimationPromise(ExecutionContext::From(script_state),
this, AnimationPromise::kReady);
if (PlayStateInternal() != kPending)
ready_promise_->Resolve(this);
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/ElementAnimation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698