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

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

Issue 2452073002: Freeze global prototype chain per WebIDL (Closed)
Patch Set: Also freeze named properties objects Created 4 years, 2 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_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 c2aa1f551e7b4c4236f0a5a23d561a130c002519..04cba59fee4b7ecc66f72695852aa28ff8665772 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
haraken 2016/10/27 08:47:05 Why is is_global not enough? You want to set the i
Dan Ehrenberg 2016/10/27 09:03:45 Also EventTarget
+
# [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