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

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

Issue 187693008: Script changes for ChangeXXX -> Change=XXX (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressing code review comments Created 6 years, 10 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/idl/dart/dart.idl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/systemnative.py
diff --git a/tools/dom/scripts/systemnative.py b/tools/dom/scripts/systemnative.py
index 36f73cc1951426722c0d57d3155424910a615a90..3ddefdbb702cbfbabfd2df4a1fd28ccb32128d0e 100644
--- a/tools/dom/scripts/systemnative.py
+++ b/tools/dom/scripts/systemnative.py
@@ -579,7 +579,12 @@ class DartiumBackend(HtmlDartGenerator):
type_info = self._TypeInfo(attr.type.id)
dart_declaration = '%s get %s' % (
self.SecureOutputType(attr.type.id, False, read_only), html_name)
- is_custom = 'Custom' in attr.ext_attrs or 'CustomGetter' in attr.ext_attrs
+ is_custom = ('Custom' in attr.ext_attrs and
+ (attr.ext_attrs['Custom'] == None or
+ attr.ext_attrs['Custom'] == 'Getter'))
+ # This seems to have been replaced with Custom=Getter (see above), but
+ # check to be sure we don't see the old syntax
+ assert(not ('CustomGetter' in attr.ext_attrs))
native_suffix = 'Getter'
auto_scope_setup = self._GenerateAutoSetupScope(attr.id, native_suffix)
cpp_callback_name = self._GenerateNativeBinding(attr.id, 1,
@@ -623,7 +628,13 @@ class DartiumBackend(HtmlDartGenerator):
def _AddSetter(self, attr, html_name):
type_info = self._TypeInfo(attr.type.id)
dart_declaration = 'void set %s(%s value)' % (html_name, self._DartType(attr.type.id))
- is_custom = set(['Custom', 'CustomSetter', 'V8CustomSetter']) & set(attr.ext_attrs)
+ is_custom = ('Custom' in attr.ext_attrs and
+ (attr.ext_attrs['Custom'] == None or
+ attr.ext_attrs['Custom'] == 'Setter'))
+ # This seems to have been replaced with Custom=Setter (see above), but
+ # check to be sure we don't see the old syntax
+ assert(not ('CustomSetter' in attr.ext_attrs))
+ assert(not ('V8CustomSetter' in attr.ext_attrs))
native_suffix = 'Setter'
auto_scope_setup = self._GenerateAutoSetupScope(attr.id, native_suffix)
cpp_callback_name = self._GenerateNativeBinding(attr.id, 2,
« no previous file with comments | « tools/dom/idl/dart/dart.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698