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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.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/ScriptCustomElementDefinition.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp
index 6b36b50f80851684a5a5c7d5c9d405bcaa70c22e..8382d22ad1110f6abc6e82d37fd3b254a61f30c6 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp
@@ -14,6 +14,7 @@
#include "bindings/core/v8/V8ScriptRunner.h"
#include "bindings/core/v8/V8ThrowException.h"
#include "core/dom/ExceptionCode.h"
+#include "core/dom/ExecutionContext.h"
#include "core/dom/custom/CustomElement.h"
#include "core/events/ErrorEvent.h"
#include "core/html/HTMLElement.h"
@@ -270,7 +271,8 @@ bool ScriptCustomElementDefinition::RunConstructor(Element* element) {
Element* ScriptCustomElementDefinition::CallConstructor() {
v8::Isolate* isolate = script_state_->GetIsolate();
DCHECK(ScriptState::Current(isolate) == script_state_);
- ExecutionContext* execution_context = script_state_->GetExecutionContext();
+ ExecutionContext* execution_context =
+ ExecutionContext::From(script_state_.Get());
v8::Local<v8::Value> result;
if (!V8Call(V8ScriptRunner::CallAsConstructor(isolate, Constructor(),
execution_context, 0, nullptr),
@@ -316,7 +318,8 @@ void ScriptCustomElementDefinition::RunCallback(
v8::TryCatch try_catch(isolate);
try_catch.SetVerbose(true);
- ExecutionContext* execution_context = script_state_->GetExecutionContext();
+ ExecutionContext* execution_context =
+ ExecutionContext::From(script_state_.Get());
v8::Local<v8::Value> element_handle =
ToV8(element, script_state_->GetContext()->Global(), isolate);
V8ScriptRunner::CallFunction(callback, execution_context, element_handle,

Powered by Google App Engine
This is Rietveld 408576698