OLD | NEW |
---|---|
1 # Copyright (C) 2013 Google Inc. All rights reserved. | 1 # Copyright (C) 2013 Google Inc. All rights reserved. |
2 # | 2 # |
3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
5 # met: | 5 # met: |
6 # | 6 # |
7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
142 has_logging = (activity_logging.startswith('For') or | 142 has_logging = (activity_logging.startswith('For') or |
143 (access_type and activity_logging.startswith(access_type))) | 143 (access_type and activity_logging.startswith(access_type))) |
144 if not has_logging: | 144 if not has_logging: |
145 return set() | 145 return set() |
146 includes.add('bindings/v8/V8DOMActivityLogger.h') | 146 includes.add('bindings/v8/V8DOMActivityLogger.h') |
147 if activity_logging.endswith('ForIsolatedWorlds'): | 147 if activity_logging.endswith('ForIsolatedWorlds'): |
148 return set(['']) | 148 return set(['']) |
149 return set(['', 'ForMainWorld']) # endswith('ForAllWorlds') | 149 return set(['', 'ForMainWorld']) # endswith('ForAllWorlds') |
150 | 150 |
151 | 151 |
152 def activity_old_value_for_setter(member): | |
153 """Returns true if the log of the setter should include the original value." "" | |
154 return ('ActivityLogging' in member.extended_attributes and | |
155 member.extended_attributes['ActivityLogging'] | |
156 .find('IncludeOldValueForSetter') != -1) | |
abarth-chromium
2014/04/22 23:35:51
This line of code is a sign that IncludeOldValueFo
Devlin
2014/04/23 01:10:03
Done.
Nils Barth (inactive)
2014/04/23 01:12:02
Python note:
You can use |in| for substring search
Devlin
2014/04/23 01:31:43
Already fixed, but thanks for the tips! :)
| |
157 | |
152 # [CallWith] | 158 # [CallWith] |
153 CALL_WITH_ARGUMENTS = { | 159 CALL_WITH_ARGUMENTS = { |
154 'ScriptState': 'state', | 160 'ScriptState': 'state', |
155 'NewScriptState': 'state', | 161 'NewScriptState': 'state', |
156 'ExecutionContext': 'scriptContext', | 162 'ExecutionContext': 'scriptContext', |
157 'ScriptArguments': 'scriptArguments.release()', | 163 'ScriptArguments': 'scriptArguments.release()', |
158 'ActiveWindow': 'callingDOMWindow(info.GetIsolate())', | 164 'ActiveWindow': 'callingDOMWindow(info.GetIsolate())', |
159 'FirstWindow': 'enteredDOMWindow(info.GetIsolate())', | 165 'FirstWindow': 'enteredDOMWindow(info.GetIsolate())', |
160 } | 166 } |
161 # List because key order matters, as we want arguments in deterministic order | 167 # List because key order matters, as we want arguments in deterministic order |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
244 | 250 |
245 The returned function checks if a method/attribute is enabled. | 251 The returned function checks if a method/attribute is enabled. |
246 Given extended attribute RuntimeEnabled=FeatureName, return: | 252 Given extended attribute RuntimeEnabled=FeatureName, return: |
247 RuntimeEnabledFeatures::{featureName}Enabled | 253 RuntimeEnabledFeatures::{featureName}Enabled |
248 """ | 254 """ |
249 extended_attributes = definition_or_member.extended_attributes | 255 extended_attributes = definition_or_member.extended_attributes |
250 if 'RuntimeEnabled' not in extended_attributes: | 256 if 'RuntimeEnabled' not in extended_attributes: |
251 return None | 257 return None |
252 feature_name = extended_attributes['RuntimeEnabled'] | 258 feature_name = extended_attributes['RuntimeEnabled'] |
253 return 'RuntimeEnabledFeatures::%sEnabled' % uncapitalize(feature_name) | 259 return 'RuntimeEnabledFeatures::%sEnabled' % uncapitalize(feature_name) |
OLD | NEW |