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 "vm/dart.h" | 5 #include "vm/dart.h" |
6 | 6 |
7 #include "vm/code_observers.h" | 7 #include "vm/code_observers.h" |
8 #include "vm/cpu.h" | 8 #include "vm/cpu.h" |
9 #include "vm/dart_api_state.h" | 9 #include "vm/dart_api_state.h" |
10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 ASSERT(predefined_handles_ != NULL); | 365 ASSERT(predefined_handles_ != NULL); |
366 return predefined_handles_->api_handles_.AllocateHandle(); | 366 return predefined_handles_->api_handles_.AllocateHandle(); |
367 } | 367 } |
368 | 368 |
369 | 369 |
370 bool Dart::IsReadOnlyHandle(uword address) { | 370 bool Dart::IsReadOnlyHandle(uword address) { |
371 ASSERT(predefined_handles_ != NULL); | 371 ASSERT(predefined_handles_ != NULL); |
372 return predefined_handles_->handles_.IsValidScopedHandle(address); | 372 return predefined_handles_->handles_.IsValidScopedHandle(address); |
373 } | 373 } |
374 | 374 |
| 375 |
| 376 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) { |
| 377 ASSERT(predefined_handles_ != NULL); |
| 378 return predefined_handles_->api_handles_.IsValidHandle(handle); |
| 379 } |
| 380 |
375 } // namespace dart | 381 } // namespace dart |
OLD | NEW |