| Index: runtime/vm/thread.cc
|
| diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc
|
| index 1b3428eaa62eba6a88e01859b9b294528db1cce3..e9381014d894ee75b400597a3994e6d3937bc1fd 100644
|
| --- a/runtime/vm/thread.cc
|
| +++ b/runtime/vm/thread.cc
|
| @@ -753,8 +753,8 @@ bool Thread::IsValidLocalHandle(Dart_Handle object) const {
|
| }
|
|
|
|
|
| -int Thread::CountLocalHandles() const {
|
| - int total = 0;
|
| +intptr_t Thread::CountLocalHandles() const {
|
| + intptr_t total = 0;
|
| ApiLocalScope* scope = api_top_scope_;
|
| while (scope != NULL) {
|
| total += scope->local_handles()->CountHandles();
|
| @@ -764,6 +764,30 @@ int Thread::CountLocalHandles() const {
|
| }
|
|
|
|
|
| +intptr_t Thread::CountZoneHandles() const {
|
| + intptr_t count = 0;
|
| + Zone* zone = zone_;
|
| + while (zone != NULL) {
|
| + count += zone->handles()->CountZoneHandles();
|
| + zone = zone->previous();
|
| + }
|
| + ASSERT(count >= 0);
|
| + return count;
|
| +}
|
| +
|
| +
|
| +intptr_t Thread::CountScopedHandles() const {
|
| + intptr_t count = 0;
|
| + Zone* zone = zone_;
|
| + while (zone != NULL) {
|
| + count += zone->handles()->CountScopedHandles();
|
| + zone = zone->previous();
|
| + }
|
| + ASSERT(count >= 0);
|
| + return count;
|
| +}
|
| +
|
| +
|
| int Thread::ZoneSizeInBytes() const {
|
| int total = 0;
|
| ApiLocalScope* scope = api_top_scope_;
|
|
|