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

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

Issue 9463011: Support flags for ParameterAdapters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/dom/scripts/systemnative.py
diff --git a/client/dom/scripts/systemnative.py b/client/dom/scripts/systemnative.py
index aa3c22cf08f66b1d368cc57cfc57004cbfb3d8d0..95c1eef490b80315b58af9ea682195852d9703e5 100644
--- a/client/dom/scripts/systemnative.py
+++ b/client/dom/scripts/systemnative.py
@@ -730,16 +730,20 @@ class NativeImplementationGenerator(systemwrapping.WrappingInterfaceGenerator):
(adapter_type, include_name) = type_info.parameter_adapter_info()
if include_name:
self._cpp_impl_includes[include_name] = 1
+ flags = ''
+ if idl_argument.ext_attrs.get('Optionial') == 'DefaultIsNullString':
+ flags = ', DartUtilities::ConvertNullToEmptyString'
emitter.Emit(
'\n'
- ' const $ADAPTER_TYPE $NAME(Dart_GetNativeArgument(args, $INDEX));\n'
+ ' const $ADAPTER_TYPE $NAME(Dart_GetNativeArgument(args, $INDEX)$FLAGS);\n'
' if (!$NAME.conversionSuccessful()) {\n'
' exception = $NAME.exception();\n'
' goto fail;\n'
' }\n',
ADAPTER_TYPE=adapter_type,
NAME=idl_argument.id,
- INDEX=index + 1)
+ INDEX=index + 1,
+ FLAGS=flags)
def _GenerateNativeBinding(self, idl_name, argument_count, dart_declaration,
native_suffix, is_custom):
« 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