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

Unified Diff: third_party/WebKit/Source/bindings/templates/callback_function.cpp

Issue 2350813005: bindings: Support sequence in callback function arguments (Closed)
Patch Set: Created 4 years, 3 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_function.cpp
diff --git a/third_party/WebKit/Source/bindings/templates/callback_function.cpp b/third_party/WebKit/Source/bindings/templates/callback_function.cpp
index d0c68a56e4c0349e5fbcb8933605e1dc465bcdca..7ef89e485113eb4acd7bc962b7096d88cdbee1a0 100644
--- a/third_party/WebKit/Source/bindings/templates/callback_function.cpp
+++ b/third_party/WebKit/Source/bindings/templates/callback_function.cpp
@@ -29,7 +29,9 @@ bool {{v8_class}}::call({{argument_declarations | join(', ')}})
if (m_callback.isEmpty())
return false;
+
ScriptState::Scope scope(scriptState);
+ ExceptionState exceptionState(scriptState->isolate(), ExceptionState::ExecutionContext, "{{cpp_class}}");
bashi 2016/09/21 02:00:21 Always declare exceptionState for simplicity. Ano
peria 2016/09/21 02:21:36 +1 to declare it here.
haraken 2016/09/21 02:25:12 What is an expected behavior when an exception is
bashi 2016/09/21 05:01:45 Hmm, glanced at existing hand-written callbacks an
Yuki 2016/09/21 07:59:37 Yes, I think that's the expected design. Always ki
{% for argument in arguments %}
v8::Local<v8::Value> {{argument.argument_name}} = {{argument.cpp_value_to_v8_value}};

Powered by Google App Engine
This is Rietveld 408576698