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

Unified Diff: third_party/WebKit/Source/bindings/scripts/v8_callback_function.py

Issue 2802223002: bindings: Throw a type error if converting an interface or callback function fails. (Closed)
Patch Set: Add |callback_function_name| to the callback function template 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/scripts/v8_callback_function.py
diff --git a/third_party/WebKit/Source/bindings/scripts/v8_callback_function.py b/third_party/WebKit/Source/bindings/scripts/v8_callback_function.py
index 1bbd2cb9a4e2fa86e48851c1a30b7810493877c5..37be007b8e64779f5b0f55a0e863ea9e451c1183 100644
--- a/third_party/WebKit/Source/bindings/scripts/v8_callback_function.py
+++ b/third_party/WebKit/Source/bindings/scripts/v8_callback_function.py
@@ -39,6 +39,11 @@ def callback_function_context(callback_function):
argument.idl_type.add_includes_for_type(callback_function.extended_attributes)
context = {
+ # While both |callback_function_name| and |cpp_class| are identical at
+ # the moment, the two are being defined because their values may change
+ # in the future (e.g. if we support [ImplementedAs=] in callback
+ # functions).
+ 'callback_function_name': callback_function.name,
'cpp_class': callback_function.name,
'cpp_includes': sorted(includes),
'forward_declarations': sorted(forward_declarations),

Powered by Google App Engine
This is Rietveld 408576698