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

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

Issue 2668753006: Special-case LocalDOMWindow for same-origin access in bindings. (Closed)
Patch Set: . Created 3 years, 11 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 c72c8e23aeca3741dcc44a9b2aca44de74704ff7..ddb6912f606c56be4e1f7edaf565ee262db1a075 100644
--- a/third_party/WebKit/Source/bindings/scripts/v8_interface.py
+++ b/third_party/WebKit/Source/bindings/scripts/v8_interface.py
@@ -244,6 +244,11 @@ def interface_context(interface, interfaces):
wrapper_class_id = ('NodeClassId' if inherits_interface(interface.name, 'Node') else 'ObjectClassId')
+ # [SameOriginImplementedAs]
+ cpp_class_name_same_origin = None
+ if 'SameOriginImplementedAs' in interface.extended_attributes:
+ cpp_class_name_same_origin = interface.extended_attributes['SameOriginImplementedAs']
+
# [ActiveScriptWrappable] must be accompanied with [DependentLifetime].
if active_scriptwrappable and not is_dependent_lifetime:
raise Exception('[ActiveScriptWrappable] interface must also specify '
@@ -261,6 +266,7 @@ def interface_context(interface, interfaces):
context = {
'cpp_class': cpp_class_name,
'cpp_class_or_partial': cpp_class_name_or_partial,
+ 'cpp_class_same_origin': cpp_class_name_same_origin,
'event_target_inheritance': 'InheritFromEventTarget' if is_event_target else 'NotInheritFromEventTarget',
'is_gc_type': True,
# FIXME: Remove 'EventTarget' special handling, http://crbug.com/383699

Powered by Google App Engine
This is Rietveld 408576698