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

Unified Diff: tools/dom/scripts/monitored.py

Issue 14251017: Distinguish between common and dart2js specific monitored. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | « tools/dom/scripts/generator.py ('k') | tools/dom/scripts/systemhtml.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/monitored.py
diff --git a/tools/dom/scripts/monitored.py b/tools/dom/scripts/monitored.py
index 06dc4dd2da9b5b0b3fd77919dedf4937336bf7ca..9d0c8da390a8495414989eae26878a52648a9228 100644
--- a/tools/dom/scripts/monitored.py
+++ b/tools/dom/scripts/monitored.py
@@ -8,21 +8,24 @@
_monitored_values = []
-def FinishMonitoring():
+def FinishMonitoring(includeDart2jsOnly):
for value in _monitored_values:
+ if value._dart2jsOnly and not includeDart2jsOnly:
+ continue
value.CheckUsage()
class MonitoredCollection(object):
- def __init__(self, name):
+ def __init__(self, name, dart2jsOnly):
self.name = name
self._used_keys = set()
+ self._dart2jsOnly = dart2jsOnly
_monitored_values.append(self)
class Dict(MonitoredCollection):
"""Wrapper for a dict that reports unused keys."""
- def __init__(self, name, map):
- super(Dict, self).__init__(name)
+ def __init__(self, name, map, dart2jsOnly=False):
+ super(Dict, self).__init__(name, dart2jsOnly)
self._map = map
def __getitem__(self, key):
@@ -52,8 +55,8 @@ class Dict(MonitoredCollection):
class Set(MonitoredCollection):
"""Wrapper for a set that reports unused keys."""
- def __init__(self, name, a_set):
- super(Set, self).__init__(name)
+ def __init__(self, name, a_set, dart2jsOnly=False):
+ super(Set, self).__init__(name, dart2jsOnly)
self._set = a_set
def __contains__(self, key):
« no previous file with comments | « tools/dom/scripts/generator.py ('k') | tools/dom/scripts/systemhtml.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698