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

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

Issue 12769016: Fixing go.sh occasionally putting types into incorrect libraries. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/htmlrenamer.py
diff --git a/tools/dom/scripts/htmlrenamer.py b/tools/dom/scripts/htmlrenamer.py
index 190c1c196de3bddbf4c5908d25b6a7409656693d..b959d832529428c3db825a15c5af3a1d12237d71 100644
--- a/tools/dom/scripts/htmlrenamer.py
+++ b/tools/dom/scripts/htmlrenamer.py
@@ -604,6 +604,13 @@ _removed_html_members = monitored.Set('htmlrenamer._removed_html_members', [
'Document.hasFocus',
])
+# Manual dart: library name lookup.
+_library_names = monitored.Dict('htmlrenamer._library_names', {
+ 'DOMWindow': 'html',
+ 'Navigator': 'html',
+ 'WorkerContext': 'html',
+})
+
class HtmlRenamer(object):
def __init__(self, database):
self._database = database
@@ -668,6 +675,10 @@ class HtmlRenamer(object):
return member_name
def GetLibraryName(self, interface):
+ # Some types have attributes merged in from many other interfaces.
+ if interface.id in _library_names:
+ return _library_names[interface.id]
+
if 'Conditional' in interface.ext_attrs:
if 'WEB_AUDIO' in interface.ext_attrs['Conditional']:
return 'web_audio'
@@ -676,9 +687,7 @@ class HtmlRenamer(object):
if 'INDEXED_DATABASE' in interface.ext_attrs['Conditional']:
return 'indexed_db'
if 'SQL_DATABASE' in interface.ext_attrs['Conditional']:
- # WorkerContext has attributes merged in from many other interfaces.
- if interface.id != 'WorkerContext':
- return 'web_sql'
+ return 'web_sql'
return 'html'
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698