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

Unified Diff: third_party/WebKit/Source/bindings/templates/callback_interface.cpp.tmpl

Issue 2811833002: Move ScriptState::GetExecutionContext (Part 2) (Closed)
Patch Set: 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/templates/callback_interface.cpp.tmpl
diff --git a/third_party/WebKit/Source/bindings/templates/callback_interface.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/callback_interface.cpp.tmpl
index e3109b5bdfe5099f86b12639f632f5eb8cd489cb..f02c71a5bf267bfbe7554391f4e70bb9ba8b8c4d 100644
--- a/third_party/WebKit/Source/bindings/templates/callback_interface.cpp.tmpl
+++ b/third_party/WebKit/Source/bindings/templates/callback_interface.cpp.tmpl
@@ -24,7 +24,8 @@ DEFINE_TRACE({{v8_class}}) {
{{method.cpp_type}} {{v8_class}}::{{method.name}}({{method.argument_declarations | join(', ')}}) {
{% set return_default = 'return true'
if method.idl_type == 'boolean' else 'return' %}{# void #}
- ExecutionContext* executionContext = m_scriptState->GetExecutionContext();
+ ExecutionContext* executionContext =
+ ExecutionContext::From(m_scriptState.Get());
jbroman 2017/04/10 18:36:52 nit: I think 4sp indent is correct here (for line
adithyas 2017/04/10 19:37:38 You are correct :) Fixed.
if (!executionContext || executionContext->IsContextSuspended() ||
executionContext->IsContextDestroyed())
{{return_default}};
@@ -61,7 +62,7 @@ DEFINE_TRACE({{v8_class}}) {
return !exceptionCatcher.HasCaught();
{% else %}{# void #}
V8ScriptRunner::CallFunction(m_callback.NewLocal(isolate),
- m_scriptState->GetExecutionContext(),
+ ExecutionContext::From(m_scriptState.Get()),
{{this_handle_parameter}},
{{method.arguments | length}},
argv,

Powered by Google App Engine
This is Rietveld 408576698