OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 #ifndef BIN_DARTUTILS_H_ | 5 #ifndef BIN_DARTUTILS_H_ |
6 #define BIN_DARTUTILS_H_ | 6 #define BIN_DARTUTILS_H_ |
7 | 7 |
8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
9 #include "include/dart_native_api.h" | 9 #include "include/dart_native_api.h" |
10 | 10 |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 uint8_t* Data() const { return cobject_->value.as_external_typed_data.data; } | 535 uint8_t* Data() const { return cobject_->value.as_external_typed_data.data; } |
536 void* Peer() const { return cobject_->value.as_external_typed_data.peer; } | 536 void* Peer() const { return cobject_->value.as_external_typed_data.peer; } |
537 Dart_WeakPersistentHandleFinalizer Callback() const { | 537 Dart_WeakPersistentHandleFinalizer Callback() const { |
538 return cobject_->value.as_external_typed_data.callback; | 538 return cobject_->value.as_external_typed_data.callback; |
539 } | 539 } |
540 | 540 |
541 private: | 541 private: |
542 DISALLOW_COPY_AND_ASSIGN(CObjectExternalUint8Array); | 542 DISALLOW_COPY_AND_ASSIGN(CObjectExternalUint8Array); |
543 }; | 543 }; |
544 | 544 |
| 545 |
| 546 class ScopedBlockingCall { |
| 547 public: |
| 548 ScopedBlockingCall() { |
| 549 Dart_IsolateBlocked(); |
| 550 } |
| 551 |
| 552 ~ScopedBlockingCall() { |
| 553 Dart_IsolateUnblocked(); |
| 554 } |
| 555 }; |
| 556 |
545 } // namespace bin | 557 } // namespace bin |
546 } // namespace dart | 558 } // namespace dart |
547 | 559 |
548 #endif // BIN_DARTUTILS_H_ | 560 #endif // BIN_DARTUTILS_H_ |
OLD | NEW |