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

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

Issue 11887006: Changed @domName annotation in comment to full fledge @DomName annotation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes. Created 7 years, 11 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/htmldartgenerator.py ('k') | tools/dom/scripts/systemnative.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/systemhtml.py
diff --git a/tools/dom/scripts/systemhtml.py b/tools/dom/scripts/systemhtml.py
index 01035cb6913d06f39c18eb7884e3e23c7372e6a9..b7dcd3417046178a759fd4e8d55304277559622d 100644
--- a/tools/dom/scripts/systemhtml.py
+++ b/tools/dom/scripts/systemhtml.py
@@ -928,16 +928,18 @@ class Dart2JSBackend(HtmlDartGenerator):
return ''
def _Annotations(self, idl_type, idl_member_name):
+ out = ''
annotations = FindDart2JSAnnotations(idl_type, self._interface.id,
idl_member_name)
if annotations:
- return '%s\n ' % annotations
- return_type = self.SecureOutputType(idl_type)
- native_type = self._NarrowToImplementationType(idl_type)
- if native_type != return_type:
- return "@Returns('%s') @Creates('%s')\n " % (native_type, native_type)
- else:
- return ''
+ out = '%s\n ' % annotations
+ if not AnyConversionAnnotations(idl_type, self._interface.id,
+ idl_member_name):
+ return_type = self.SecureOutputType(idl_type)
+ native_type = self._NarrowToImplementationType(idl_type)
+ if native_type != return_type:
+ out += "@Returns('%s') @Creates('%s')\n " % (native_type, native_type)
+ return out
def CustomJSMembers(self):
return _js_custom_members
« no previous file with comments | « tools/dom/scripts/htmldartgenerator.py ('k') | tools/dom/scripts/systemnative.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698