| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "bin/dartutils.h" | 5 #include "bin/dartutils.h" |
| 6 #include "bin/filter.h" | 6 #include "bin/filter.h" |
| 7 #include "bin/io_buffer.h" | 7 #include "bin/io_buffer.h" |
| 8 | 8 |
| 9 #include "include/dart_api.h" | 9 #include "include/dart_api.h" |
| 10 | 10 |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 Dart_EnterScope(); | 159 Dart_EnterScope(); |
| 160 Dart_Handle filter_obj = Dart_GetNativeArgument(args, 0); | 160 Dart_Handle filter_obj = Dart_GetNativeArgument(args, 0); |
| 161 Filter* filter = GetFilter(filter_obj); | 161 Filter* filter = GetFilter(filter_obj); |
| 162 EndFilter(filter_obj, filter); | 162 EndFilter(filter_obj, filter); |
| 163 Dart_ExitScope(); | 163 Dart_ExitScope(); |
| 164 } | 164 } |
| 165 | 165 |
| 166 | 166 |
| 167 Dart_Handle Filter::SetFilterPointerNativeField(Dart_Handle filter, | 167 Dart_Handle Filter::SetFilterPointerNativeField(Dart_Handle filter, |
| 168 Filter* filter_pointer) { | 168 Filter* filter_pointer) { |
| 169 return Dart_SetNativeInstanceField(filter, | 169 return Dart_SetNativeInstanceField( |
| 170 kFilterPointerNativeField, | 170 filter, |
| 171 (intptr_t)filter_pointer); | 171 kFilterPointerNativeField, |
| 172 reinterpret_cast<intptr_t>(filter_pointer)); |
| 172 } | 173 } |
| 173 | 174 |
| 174 | 175 |
| 175 Dart_Handle Filter::GetFilterPointerNativeField(Dart_Handle filter, | 176 Dart_Handle Filter::GetFilterPointerNativeField(Dart_Handle filter, |
| 176 Filter** filter_pointer) { | 177 Filter** filter_pointer) { |
| 177 return Dart_GetNativeInstanceField( | 178 return Dart_GetNativeInstanceField( |
| 178 filter, | 179 filter, |
| 179 kFilterPointerNativeField, | 180 kFilterPointerNativeField, |
| 180 reinterpret_cast<intptr_t*>(filter_pointer)); | 181 reinterpret_cast<intptr_t*>(filter_pointer)); |
| 181 } | 182 } |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 case Z_STREAM_ERROR: | 304 case Z_STREAM_ERROR: |
| 304 // An error occoured. | 305 // An error occoured. |
| 305 delete[] current_buffer_; | 306 delete[] current_buffer_; |
| 306 current_buffer_ = NULL; | 307 current_buffer_ = NULL; |
| 307 return -1; | 308 return -1; |
| 308 } | 309 } |
| 309 } | 310 } |
| 310 | 311 |
| 311 } // namespace bin | 312 } // namespace bin |
| 312 } // namespace dart | 313 } // namespace dart |
| OLD | NEW |