| 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 "include/dart_api.h" | 5 #include "include/dart_api.h" |
| 6 #include "include/dart_mirrors_api.h" | 6 #include "include/dart_mirrors_api.h" |
| 7 #include "include/dart_native_api.h" | 7 #include "include/dart_native_api.h" |
| 8 | 8 |
| 9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
| 10 #include "vm/bigint_operations.h" | 10 #include "vm/bigint_operations.h" |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 *peer = data->peer(); | 258 *peer = data->peer(); |
| 259 return true; | 259 return true; |
| 260 } | 260 } |
| 261 } | 261 } |
| 262 return false; | 262 return false; |
| 263 } | 263 } |
| 264 | 264 |
| 265 | 265 |
| 266 void Api::SetWeakHandleReturnValue(NativeArguments* args, | 266 void Api::SetWeakHandleReturnValue(NativeArguments* args, |
| 267 Dart_WeakPersistentHandle retval) { | 267 Dart_WeakPersistentHandle retval) { |
| 268 args->SetReturnUnsafe( | 268 args->SetReturnUnsafe(Api::UnwrapAsWeakPersistentHandle(retval)->raw()); |
| 269 reinterpret_cast<FinalizablePersistentHandle*>(retval)->raw()); | |
| 270 } | 269 } |
| 271 | 270 |
| 272 | 271 |
| 273 // --- Handles --- | 272 // --- Handles --- |
| 274 | 273 |
| 275 DART_EXPORT bool Dart_IsError(Dart_Handle handle) { | 274 DART_EXPORT bool Dart_IsError(Dart_Handle handle) { |
| 276 return RawObject::IsErrorClassId(Api::ClassId(handle)); | 275 return RawObject::IsErrorClassId(Api::ClassId(handle)); |
| 277 } | 276 } |
| 278 | 277 |
| 279 | 278 |
| (...skipping 3956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4236 } | 4235 } |
| 4237 { | 4236 { |
| 4238 NoGCScope no_gc; | 4237 NoGCScope no_gc; |
| 4239 RawObject* raw_obj = obj.raw(); | 4238 RawObject* raw_obj = obj.raw(); |
| 4240 isolate->heap()->SetPeer(raw_obj, peer); | 4239 isolate->heap()->SetPeer(raw_obj, peer); |
| 4241 } | 4240 } |
| 4242 return Api::Success(); | 4241 return Api::Success(); |
| 4243 } | 4242 } |
| 4244 | 4243 |
| 4245 } // namespace dart | 4244 } // namespace dart |
| OLD | NEW |