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

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

Issue 1509493002: Disallow [Measure] and [MeasureAs] on interfaces without a constructor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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_interface.py
diff --git a/third_party/WebKit/Source/bindings/scripts/v8_interface.py b/third_party/WebKit/Source/bindings/scripts/v8_interface.py
index dbfaf42eb4e608491a8a09dd5daac3acacc2ac18..6526ec94d7598537fa6acbda499b62a7d7307216 100644
--- a/third_party/WebKit/Source/bindings/scripts/v8_interface.py
+++ b/third_party/WebKit/Source/bindings/scripts/v8_interface.py
@@ -231,11 +231,14 @@ def interface_context(interface):
if constructors or custom_constructors or named_constructor:
if interface.is_partial:
raise Exception('[Constructor] and [NamedConstructor] MUST NOT be'
- ' specified on partial interface definitions:'
+ ' specified on partial interface definitions: '
'%s' % interface.name)
includes.add('bindings/core/v8/V8ObjectConstructor.h')
includes.add('core/frame/LocalDOMWindow.h')
+ elif 'Measure' in extended_attributes or 'MeasureAs' in extended_attributes:
+ raise Exception('[Measure] or [MeasureAs] specified for interface without a constructor: '
+ '%s' % interface.name)
# [Unscopeable] attributes and methods
unscopeables = []

Powered by Google App Engine
This is Rietveld 408576698