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

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

Issue 2452073002: Freeze global prototype chain per WebIDL (Closed)
Patch Set: Test improvements Created 4 years, 1 month 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 301010363d843c2d835df59ab31e5a5340182350..3c82eee53e88e3b02ccb73e965bda4bdeaf94780 100644
--- a/third_party/WebKit/Source/bindings/scripts/v8_interface.py
+++ b/third_party/WebKit/Source/bindings/scripts/v8_interface.py
@@ -198,6 +198,11 @@ def interface_context(interface, interfaces):
is_global = ('PrimaryGlobal' in extended_attributes or
'Global' in extended_attributes)
+ # [ImmutablePrototype]
+ # TODO(littledan): Is it possible to deduce this based on inheritance,
+ # as in the WebIDL spec?
+ is_immutable_prototype = is_global or 'ImmutablePrototype' in extended_attributes
+
# [SetWrapperReferenceFrom]
set_wrapper_reference_from = extended_attributes.get('SetWrapperReferenceFrom')
if set_wrapper_reference_from:
@@ -258,6 +263,7 @@ def interface_context(interface, interfaces):
'is_event_target': is_event_target,
'is_exception': interface.is_exception,
'is_global': is_global,
+ 'is_immutable_prototype': is_immutable_prototype,
'is_node': inherits_interface(interface.name, 'Node'),
'is_partial': interface.is_partial,
'is_typed_array_type': is_typed_array_type,

Powered by Google App Engine
This is Rietveld 408576698