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 6027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6038 } | 6038 } |
6039 | 6039 |
6040 | 6040 |
6041 int HeapGraphNode::GetSelfSize() const { | 6041 int HeapGraphNode::GetSelfSize() const { |
6042 i::Isolate* isolate = i::Isolate::Current(); | 6042 i::Isolate* isolate = i::Isolate::Current(); |
6043 IsDeadCheck(isolate, "v8::HeapGraphNode::GetSelfSize"); | 6043 IsDeadCheck(isolate, "v8::HeapGraphNode::GetSelfSize"); |
6044 return ToInternal(this)->self_size(); | 6044 return ToInternal(this)->self_size(); |
6045 } | 6045 } |
6046 | 6046 |
6047 | 6047 |
6048 int HeapGraphNode::GetRetainedSize() const { | |
6049 i::Isolate* isolate = i::Isolate::Current(); | |
6050 IsDeadCheck(isolate, "v8::HeapSnapshot::GetRetainedSize"); | |
6051 return ToInternal(this)->retained_size(); | |
6052 } | |
6053 | |
6054 | |
6055 int HeapGraphNode::GetChildrenCount() const { | 6048 int HeapGraphNode::GetChildrenCount() const { |
6056 i::Isolate* isolate = i::Isolate::Current(); | 6049 i::Isolate* isolate = i::Isolate::Current(); |
6057 IsDeadCheck(isolate, "v8::HeapSnapshot::GetChildrenCount"); | 6050 IsDeadCheck(isolate, "v8::HeapSnapshot::GetChildrenCount"); |
6058 return ToInternal(this)->children().length(); | 6051 return ToInternal(this)->children().length(); |
6059 } | 6052 } |
6060 | 6053 |
6061 | 6054 |
6062 const HeapGraphEdge* HeapGraphNode::GetChild(int index) const { | 6055 const HeapGraphEdge* HeapGraphNode::GetChild(int index) const { |
6063 i::Isolate* isolate = i::Isolate::Current(); | 6056 i::Isolate* isolate = i::Isolate::Current(); |
6064 IsDeadCheck(isolate, "v8::HeapSnapshot::GetChild"); | 6057 IsDeadCheck(isolate, "v8::HeapSnapshot::GetChild"); |
6065 return reinterpret_cast<const HeapGraphEdge*>( | 6058 return reinterpret_cast<const HeapGraphEdge*>( |
6066 ToInternal(this)->children()[index]); | 6059 ToInternal(this)->children()[index]); |
6067 } | 6060 } |
6068 | 6061 |
6069 | 6062 |
6070 int HeapGraphNode::GetRetainersCount() const { | |
6071 i::Isolate* isolate = i::Isolate::Current(); | |
6072 IsDeadCheck(isolate, "v8::HeapSnapshot::GetRetainersCount"); | |
6073 return ToInternal(this)->retainers().length(); | |
6074 } | |
6075 | |
6076 | |
6077 const HeapGraphEdge* HeapGraphNode::GetRetainer(int index) const { | |
6078 i::Isolate* isolate = i::Isolate::Current(); | |
6079 IsDeadCheck(isolate, "v8::HeapSnapshot::GetRetainer"); | |
6080 return reinterpret_cast<const HeapGraphEdge*>( | |
6081 ToInternal(this)->retainers()[index]); | |
6082 } | |
6083 | |
6084 | |
6085 const HeapGraphNode* HeapGraphNode::GetDominatorNode() const { | |
6086 i::Isolate* isolate = i::Isolate::Current(); | |
6087 IsDeadCheck(isolate, "v8::HeapSnapshot::GetDominatorNode"); | |
6088 return reinterpret_cast<const HeapGraphNode*>(ToInternal(this)->dominator()); | |
6089 } | |
6090 | |
6091 | |
6092 v8::Handle<v8::Value> HeapGraphNode::GetHeapValue() const { | 6063 v8::Handle<v8::Value> HeapGraphNode::GetHeapValue() const { |
6093 i::Isolate* isolate = i::Isolate::Current(); | 6064 i::Isolate* isolate = i::Isolate::Current(); |
6094 IsDeadCheck(isolate, "v8::HeapGraphNode::GetHeapValue"); | 6065 IsDeadCheck(isolate, "v8::HeapGraphNode::GetHeapValue"); |
6095 i::Handle<i::HeapObject> object = ToInternal(this)->GetHeapObject(); | 6066 i::Handle<i::HeapObject> object = ToInternal(this)->GetHeapObject(); |
6096 return v8::Handle<Value>(!object.is_null() ? | 6067 return v8::Handle<Value>(!object.is_null() ? |
6097 ToApi<Value>(object) : ToApi<Value>( | 6068 ToApi<Value>(object) : ToApi<Value>( |
6098 isolate->factory()->undefined_value())); | 6069 isolate->factory()->undefined_value())); |
6099 } | 6070 } |
6100 | 6071 |
6101 | 6072 |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6411 | 6382 |
6412 | 6383 |
6413 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 6384 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
6414 HandleScopeImplementer* scope_implementer = | 6385 HandleScopeImplementer* scope_implementer = |
6415 reinterpret_cast<HandleScopeImplementer*>(storage); | 6386 reinterpret_cast<HandleScopeImplementer*>(storage); |
6416 scope_implementer->IterateThis(v); | 6387 scope_implementer->IterateThis(v); |
6417 return storage + ArchiveSpacePerThread(); | 6388 return storage + ArchiveSpacePerThread(); |
6418 } | 6389 } |
6419 | 6390 |
6420 } } // namespace v8::internal | 6391 } } // namespace v8::internal |
OLD | NEW |