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

Unified Diff: third_party/WebKit/Source/core/events/Event.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
Index: third_party/WebKit/Source/core/events/Event.cpp
diff --git a/third_party/WebKit/Source/core/events/Event.cpp b/third_party/WebKit/Source/core/events/Event.cpp
index d730f7d23dfc4cd10a1c4cd060dccfc37305d59e..082f1da5bafc87db7cea460f6758d9c2ee17c15e 100644
--- a/third_party/WebKit/Source/core/events/Event.cpp
+++ b/third_party/WebKit/Source/core/events/Event.cpp
@@ -23,6 +23,7 @@
#include "core/events/Event.h"
#include "bindings/core/v8/ScriptState.h"
+#include "core/dom/ExecutionContext.h"
#include "core/dom/StaticNodeList.h"
#include "core/events/EventDispatchMediator.h"
#include "core/events/EventTarget.h"
@@ -138,10 +139,10 @@ void Event::initEvent(const AtomicString& event_type_arg,
bool Event::legacyReturnValue(ScriptState* script_state) const {
bool return_value = !defaultPrevented();
if (return_value) {
- UseCounter::Count(script_state->GetExecutionContext(),
+ UseCounter::Count(ExecutionContext::From(script_state),
UseCounter::kEventGetReturnValueTrue);
} else {
- UseCounter::Count(script_state->GetExecutionContext(),
+ UseCounter::Count(ExecutionContext::From(script_state),
UseCounter::kEventGetReturnValueFalse);
}
return return_value;
@@ -149,10 +150,10 @@ bool Event::legacyReturnValue(ScriptState* script_state) const {
void Event::setLegacyReturnValue(ScriptState* script_state, bool return_value) {
if (return_value) {
- UseCounter::Count(script_state->GetExecutionContext(),
+ UseCounter::Count(ExecutionContext::From(script_state),
UseCounter::kEventSetReturnValueTrue);
} else {
- UseCounter::Count(script_state->GetExecutionContext(),
+ UseCounter::Count(ExecutionContext::From(script_state),
UseCounter::kEventSetReturnValueFalse);
}
SetDefaultPrevented(!return_value);
« no previous file with comments | « third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp ('k') | third_party/WebKit/Source/core/fileapi/Blob.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698