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

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

Issue 330293002: Removing unnecessary PerWorldBindings for DOM API calls that are monitored by Activity Logger. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: style Created 6 years, 6 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: Source/bindings/scripts/v8_utilities.py
diff --git a/Source/bindings/scripts/v8_utilities.py b/Source/bindings/scripts/v8_utilities.py
index 9f1eb6d1bf6c0737d3e16016e8fe9db84c7cf5e0..6b53d079af93309d7d8d642900b080e6e10b4189 100644
--- a/Source/bindings/scripts/v8_utilities.py
+++ b/Source/bindings/scripts/v8_utilities.py
@@ -146,6 +146,23 @@ def activity_logging_world_list(member, access_type=''):
return set(['']) # At minimum, include isolated worlds.
+# [ActivityLogging]
+def activity_logging_world_check(member):
+ """Returns if an isolated world check is required when generating activity
+ logging code.
+
+ The check is required when there is no per-world binding code and logging is
+ required only for isolated world.
+ """
+ extended_attributes = member.extended_attributes
+ if 'LogActivity' not in extended_attributes:
+ return False
+ if ('PerWorldBindings' not in extended_attributes and
+ 'LogAllWorlds' not in extended_attributes):
+ return True
+ return False
+
+
# [CallWith]
CALL_WITH_ARGUMENTS = {
'ScriptState': 'scriptState',

Powered by Google App Engine
This is Rietveld 408576698