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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp

Issue 2810743003: Move ScriptState::GetExecutionContext (Part 3) (Closed)
Patch Set: Rebase 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/bindings/core/v8/V8AbstractEventListener.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp b/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp
index dce159b02208fac122e8f98bb37d886de5ba04b2..a81fa4cb5def22303f111bc878b6ea6645f14e63 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp
@@ -37,6 +37,7 @@
#include "bindings/core/v8/V8PrivateProperty.h"
#include "core/dom/Document.h"
#include "core/dom/DocumentParser.h"
+#include "core/dom/ExecutionContext.h"
#include "core/events/BeforeUnloadEvent.h"
#include "core/events/Event.h"
#include "core/workers/WorkerGlobalScope.h"
@@ -146,8 +147,8 @@ void V8AbstractEventListener::InvokeEventHandler(
event->target()->UncaughtExceptionInEventHandler();
if (!try_catch.CanContinue()) { // Result of TerminateExecution().
- if (script_state->GetExecutionContext()->IsWorkerGlobalScope())
- ToWorkerGlobalScope(script_state->GetExecutionContext())
+ if (ExecutionContext::From(script_state)->IsWorkerGlobalScope())
+ ToWorkerGlobalScope(ExecutionContext::From(script_state))
->ScriptController()
->ForbidExecution();
return;

Powered by Google App Engine
This is Rietveld 408576698