OLD | NEW |
1 {% extends 'interface_base_cpp.template' %} | 1 {% extends 'interface_base_cpp.template' %} |
2 | 2 |
3 | 3 |
4 {# TODO(terry): Implement setter and deleter too #} | 4 {# TODO(terry): Implement setter and deleter too #} |
5 | 5 |
6 | 6 |
7 {##############################################################################} | 7 {##############################################################################} |
8 {% block named_property_getter %} | 8 {% block named_property_getter %} |
9 {% if named_property_getter and not named_property_getter.is_custom %} | 9 {% if named_property_getter and not named_property_getter.is_custom %} |
10 static void namedPropertyGetter(Dart_NativeArguments args) | 10 static void namedPropertyGetter(Dart_NativeArguments args) |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 {{cpp_class}}* /* FIXME(vsm): Remove this. */ ALLOW_UNUSED receiver = GetRec
eiver<{{cpp_class}}>(args); | 42 {{cpp_class}}* /* FIXME(vsm): Remove this. */ ALLOW_UNUSED receiver = GetRec
eiver<{{cpp_class}}>(args); |
43 Dart_Handle exception = nullptr; | 43 Dart_Handle exception = nullptr; |
44 { | 44 { |
45 {% if named_property_setter.is_raises_exception %} | 45 {% if named_property_setter.is_raises_exception %} |
46 ExceptionState es; | 46 ExceptionState es; |
47 {% endif %} | 47 {% endif %} |
48 | 48 |
49 String name = DartConverter<String>::FromArguments(args, 1, exception); | 49 String name = DartConverter<String>::FromArguments(args, 1, exception); |
50 if (exception) | 50 if (exception) |
51 goto fail; | 51 goto fail; |
52 String value = DartConverter<String>::FromArguments(args, 2, exception); | 52 String value = DartConverter<String>::FromArgumentsWithNullCheck(args, 2
, exception); |
53 if (exception) | 53 if (exception) |
54 goto fail; | 54 goto fail; |
55 {{named_property_setter.cpp_value}}; | 55 {{named_property_setter.cpp_value}}; |
56 return; | 56 return; |
57 } | 57 } |
58 | 58 |
59 fail: | 59 fail: |
60 Dart_ThrowException(exception); | 60 Dart_ThrowException(exception); |
61 ASSERT_NOT_REACHED(); | 61 ASSERT_NOT_REACHED(); |
62 } | 62 } |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 return; | 235 return; |
236 fail: | 236 fail: |
237 Dart_ThrowException(exception); | 237 Dart_ThrowException(exception); |
238 ASSERT_NOT_REACHED(); | 238 ASSERT_NOT_REACHED(); |
239 } | 239 } |
240 {% endif %} | 240 {% endif %} |
241 {% endblock %} | 241 {% endblock %} |
242 | 242 |
243 | 243 |
244 {##############################################################################} | 244 {##############################################################################} |
OLD | NEW |