OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 6953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6964 isolate->factory()->InternalizeUtf8String(ToInternal(this)->name())); | 6964 isolate->factory()->InternalizeUtf8String(ToInternal(this)->name())); |
6965 } | 6965 } |
6966 | 6966 |
6967 | 6967 |
6968 SnapshotObjectId HeapGraphNode::GetId() const { | 6968 SnapshotObjectId HeapGraphNode::GetId() const { |
6969 return ToInternal(this)->id(); | 6969 return ToInternal(this)->id(); |
6970 } | 6970 } |
6971 | 6971 |
6972 | 6972 |
6973 int HeapGraphNode::GetSelfSize() const { | 6973 int HeapGraphNode::GetSelfSize() const { |
| 6974 size_t size = ToInternal(this)->self_size(); |
| 6975 CHECK(size <= static_cast<size_t>(internal::kMaxInt)); |
| 6976 return static_cast<int>(size); |
| 6977 } |
| 6978 |
| 6979 |
| 6980 size_t HeapGraphNode::GetShallowSize() const { |
6974 return ToInternal(this)->self_size(); | 6981 return ToInternal(this)->self_size(); |
6975 } | 6982 } |
6976 | 6983 |
6977 | 6984 |
6978 int HeapGraphNode::GetChildrenCount() const { | 6985 int HeapGraphNode::GetChildrenCount() const { |
6979 return ToInternal(this)->children().length(); | 6986 return ToInternal(this)->children().length(); |
6980 } | 6987 } |
6981 | 6988 |
6982 | 6989 |
6983 const HeapGraphEdge* HeapGraphNode::GetChild(int index) const { | 6990 const HeapGraphEdge* HeapGraphNode::GetChild(int index) const { |
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7370 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7377 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
7371 Address callback_address = | 7378 Address callback_address = |
7372 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7379 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
7373 VMState<EXTERNAL> state(isolate); | 7380 VMState<EXTERNAL> state(isolate); |
7374 ExternalCallbackScope call_scope(isolate, callback_address); | 7381 ExternalCallbackScope call_scope(isolate, callback_address); |
7375 callback(info); | 7382 callback(info); |
7376 } | 7383 } |
7377 | 7384 |
7378 | 7385 |
7379 } } // namespace v8::internal | 7386 } } // namespace v8::internal |
OLD | NEW |