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

Unified Diff: Source/bindings/scripts/v8_attributes.py

Issue 413393003: Blink-in-JS: Implement internal APIs exposed only to private scripts (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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
« no previous file with comments | « Source/bindings/core/v8/V8DOMConfiguration.cpp ('k') | Source/bindings/scripts/v8_interface.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/v8_attributes.py
diff --git a/Source/bindings/scripts/v8_attributes.py b/Source/bindings/scripts/v8_attributes.py
index 485991d8860483eee00f66dbb1d3a7236d874f38..2d5f5e78eb032649f6db204da671a89d7335ff3b 100644
--- a/Source/bindings/scripts/v8_attributes.py
+++ b/Source/bindings/scripts/v8_attributes.py
@@ -78,6 +78,9 @@ def attribute_context(interface, attribute):
includes.add('core/frame/LocalFrame.h')
includes.add('platform/ScriptForbiddenScope.h')
+ # [OnlyExposedToPrivateScript]
+ is_only_exposed_to_private_script = 'OnlyExposedToPrivateScript' in extended_attributes
+
if (base_idl_type == 'EventHandler' and
interface.name in ['Window', 'WorkerGlobalScope'] and
attribute.name == 'onerror'):
@@ -128,7 +131,7 @@ def attribute_context(interface, attribute):
'is_unforgeable': 'Unforgeable' in extended_attributes,
'measure_as': v8_utilities.measure_as(attribute), # [MeasureAs]
'name': attribute.name,
- 'only_exposed_to_private_script': 'OnlyExposedToPrivateScript' in extended_attributes,
+ 'only_exposed_to_private_script': is_only_exposed_to_private_script,
'per_context_enabled_function': v8_utilities.per_context_enabled_function_name(attribute), # [PerContextEnabled]
'private_script_v8_value_to_local_cpp_value': idl_type.v8_value_to_local_cpp_value(
extended_attributes, 'v8Value', 'cppValue', isolate='scriptState->isolate()', used_in_private_script=True),
@@ -141,6 +144,7 @@ def attribute_context(interface, attribute):
if 'ReflectOnly' in extended_attributes else None,
'runtime_enabled_function': v8_utilities.runtime_enabled_function_name(attribute), # [RuntimeEnabled]
'setter_callback': setter_callback_name(interface, attribute),
+ 'should_be_exposed_to_script': not (is_implemented_in_private_script and is_only_exposed_to_private_script),
'v8_type': v8_types.v8_type(base_idl_type),
'world_suffixes': ['', 'ForMainWorld']
if 'PerWorldBindings' in extended_attributes
« no previous file with comments | « Source/bindings/core/v8/V8DOMConfiguration.cpp ('k') | Source/bindings/scripts/v8_interface.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698