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

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

Issue 249833002: Split ActivityLogging attributes in IDLExtendedAttributes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 8 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/IDLExtendedAttributes.txt ('k') | Source/bindings/tests/idls/TestObject.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/v8_utilities.py
diff --git a/Source/bindings/scripts/v8_utilities.py b/Source/bindings/scripts/v8_utilities.py
index 67b03209fbab876c98118ed9ae23974e75fc88f5..7cce37308b1270bf0e94baf70dd0e39a3de2492f 100644
--- a/Source/bindings/scripts/v8_utilities.py
+++ b/Source/bindings/scripts/v8_utilities.py
@@ -128,25 +128,22 @@ def v8_class_name(interface):
################################################################################
# [ActivityLogging]
-def activity_logging_world_list(member, access_type=None):
+def activity_logging_world_list(member, access_type=''):
"""Returns a set of world suffixes for which a definition member has activity logging, for specified access type.
access_type can be 'Getter' or 'Setter' if only checking getting or setting.
"""
- if 'ActivityLogging' not in member.extended_attributes:
+ extended_attributes = member.extended_attributes
+ if 'LogActivity' not in extended_attributes:
return set()
- activity_logging = member.extended_attributes['ActivityLogging']
- # [ActivityLogging=For*] (no prefix, starts with the worlds suffix) means
- # "log for all use (method)/access (attribute)", otherwise check that value
- # agrees with specified access_type (Getter/Setter).
- has_logging = (activity_logging.startswith('For') or
- (access_type and activity_logging.startswith(access_type)))
- if not has_logging:
+ log_activity = extended_attributes['LogActivity']
+ if log_activity and not log_activity.startswith(access_type):
return set()
+
includes.add('bindings/v8/V8DOMActivityLogger.h')
- if activity_logging.endswith('ForIsolatedWorlds'):
- return set([''])
- return set(['', 'ForMainWorld']) # endswith('ForAllWorlds')
+ if 'LogAllWorlds' in extended_attributes:
+ return set(['', 'ForMainWorld'])
+ return set(['']) # At minimum, include isolated worlds.
# [CallWith]
« no previous file with comments | « Source/bindings/IDLExtendedAttributes.txt ('k') | Source/bindings/tests/idls/TestObject.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698