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

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

Issue 2837923003: Make NodeFilter a legacy callback interface. (Closed)
Patch Set: templates.gni, etc. 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/utilities.py
diff --git a/third_party/WebKit/Source/bindings/scripts/utilities.py b/third_party/WebKit/Source/bindings/scripts/utilities.py
index 98d42660595d63a766a5fb217003b9fc139be894..b75da4387174562aa453d9f5676ebf68c912d8d6 100644
--- a/third_party/WebKit/Source/bindings/scripts/utilities.py
+++ b/third_party/WebKit/Source/bindings/scripts/utilities.py
@@ -344,9 +344,12 @@ def write_pickle_file(pickle_filename, data):
# Leading and trailing context (e.g. following '{') used to avoid false matches.
################################################################################
-def is_callback_interface_from_idl(file_contents):
+def is_non_legacy_callback_interface_from_idl(file_contents):
+ """Returns True if the specified IDL is a non-legacy callback interface."""
match = re.search(r'callback\s+interface\s+\w+\s*{', file_contents)
- return bool(match)
+ # Having constants means it's a legacy callback interface.
+ # https://heycam.github.io/webidl/#legacy-callback-interface-object
+ return bool(match) and not re.search(r'\s+const\b', file_contents)
def should_generate_impl_file_from_idl(file_contents):

Powered by Google App Engine
This is Rietveld 408576698