OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/api.h" | 5 #include "src/api.h" |
6 | 6 |
7 #include <string.h> // For memcpy, strlen. | 7 #include <string.h> // For memcpy, strlen. |
8 #ifdef V8_USE_ADDRESS_SANITIZER | 8 #ifdef V8_USE_ADDRESS_SANITIZER |
9 #include <sanitizer/asan_interface.h> | 9 #include <sanitizer/asan_interface.h> |
10 #endif // V8_USE_ADDRESS_SANITIZER | 10 #endif // V8_USE_ADDRESS_SANITIZER |
(...skipping 9495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9506 return ToInternal(this)->id(); | 9506 return ToInternal(this)->id(); |
9507 } | 9507 } |
9508 | 9508 |
9509 | 9509 |
9510 size_t HeapGraphNode::GetShallowSize() const { | 9510 size_t HeapGraphNode::GetShallowSize() const { |
9511 return ToInternal(this)->self_size(); | 9511 return ToInternal(this)->self_size(); |
9512 } | 9512 } |
9513 | 9513 |
9514 | 9514 |
9515 int HeapGraphNode::GetChildrenCount() const { | 9515 int HeapGraphNode::GetChildrenCount() const { |
9516 return ToInternal(this)->children().length(); | 9516 return ToInternal(this)->children_count(); |
9517 } | 9517 } |
9518 | 9518 |
9519 | 9519 |
9520 const HeapGraphEdge* HeapGraphNode::GetChild(int index) const { | 9520 const HeapGraphEdge* HeapGraphNode::GetChild(int index) const { |
9521 return reinterpret_cast<const HeapGraphEdge*>( | 9521 return reinterpret_cast<const HeapGraphEdge*>(ToInternal(this)->child(index)); |
9522 ToInternal(this)->children()[index]); | |
9523 } | 9522 } |
9524 | 9523 |
9525 | 9524 |
9526 static i::HeapSnapshot* ToInternal(const HeapSnapshot* snapshot) { | 9525 static i::HeapSnapshot* ToInternal(const HeapSnapshot* snapshot) { |
9527 return const_cast<i::HeapSnapshot*>( | 9526 return const_cast<i::HeapSnapshot*>( |
9528 reinterpret_cast<const i::HeapSnapshot*>(snapshot)); | 9527 reinterpret_cast<const i::HeapSnapshot*>(snapshot)); |
9529 } | 9528 } |
9530 | 9529 |
9531 | 9530 |
9532 void HeapSnapshot::Delete() { | 9531 void HeapSnapshot::Delete() { |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9922 Address callback_address = | 9921 Address callback_address = |
9923 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 9922 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
9924 VMState<EXTERNAL> state(isolate); | 9923 VMState<EXTERNAL> state(isolate); |
9925 ExternalCallbackScope call_scope(isolate, callback_address); | 9924 ExternalCallbackScope call_scope(isolate, callback_address); |
9926 callback(info); | 9925 callback(info); |
9927 } | 9926 } |
9928 | 9927 |
9929 | 9928 |
9930 } // namespace internal | 9929 } // namespace internal |
9931 } // namespace v8 | 9930 } // namespace v8 |
OLD | NEW |