| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 5748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5759 } | 5759 } |
| 5760 | 5760 |
| 5761 | 5761 |
| 5762 const HeapGraphNode* HeapGraphNode::GetDominatorNode() const { | 5762 const HeapGraphNode* HeapGraphNode::GetDominatorNode() const { |
| 5763 i::Isolate* isolate = i::Isolate::Current(); | 5763 i::Isolate* isolate = i::Isolate::Current(); |
| 5764 IsDeadCheck(isolate, "v8::HeapSnapshot::GetDominatorNode"); | 5764 IsDeadCheck(isolate, "v8::HeapSnapshot::GetDominatorNode"); |
| 5765 return reinterpret_cast<const HeapGraphNode*>(ToInternal(this)->dominator()); | 5765 return reinterpret_cast<const HeapGraphNode*>(ToInternal(this)->dominator()); |
| 5766 } | 5766 } |
| 5767 | 5767 |
| 5768 | 5768 |
| 5769 v8::Handle<v8::Value> HeapGraphNode::GetHeapValue() const { |
| 5770 i::Isolate* isolate = i::Isolate::Current(); |
| 5771 IsDeadCheck(isolate, "v8::HeapGraphNode::GetHeapValue"); |
| 5772 i::Handle<i::HeapObject> object = ToInternal(this)->GetHeapObject(); |
| 5773 return v8::Handle<Value>(!object.is_null() ? |
| 5774 ToApi<Value>(object) : ToApi<Value>( |
| 5775 isolate->factory()->undefined_value())); |
| 5776 } |
| 5777 |
| 5778 |
| 5769 static i::HeapSnapshot* ToInternal(const HeapSnapshot* snapshot) { | 5779 static i::HeapSnapshot* ToInternal(const HeapSnapshot* snapshot) { |
| 5770 return const_cast<i::HeapSnapshot*>( | 5780 return const_cast<i::HeapSnapshot*>( |
| 5771 reinterpret_cast<const i::HeapSnapshot*>(snapshot)); | 5781 reinterpret_cast<const i::HeapSnapshot*>(snapshot)); |
| 5772 } | 5782 } |
| 5773 | 5783 |
| 5774 | 5784 |
| 5775 void HeapSnapshot::Delete() { | 5785 void HeapSnapshot::Delete() { |
| 5776 i::Isolate* isolate = i::Isolate::Current(); | 5786 i::Isolate* isolate = i::Isolate::Current(); |
| 5777 IsDeadCheck(isolate, "v8::HeapSnapshot::Delete"); | 5787 IsDeadCheck(isolate, "v8::HeapSnapshot::Delete"); |
| 5778 if (i::HeapProfiler::GetSnapshotsCount() > 1) { | 5788 if (i::HeapProfiler::GetSnapshotsCount() > 1) { |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6038 | 6048 |
| 6039 | 6049 |
| 6040 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 6050 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
| 6041 HandleScopeImplementer* scope_implementer = | 6051 HandleScopeImplementer* scope_implementer = |
| 6042 reinterpret_cast<HandleScopeImplementer*>(storage); | 6052 reinterpret_cast<HandleScopeImplementer*>(storage); |
| 6043 scope_implementer->IterateThis(v); | 6053 scope_implementer->IterateThis(v); |
| 6044 return storage + ArchiveSpacePerThread(); | 6054 return storage + ArchiveSpacePerThread(); |
| 6045 } | 6055 } |
| 6046 | 6056 |
| 6047 } } // namespace v8::internal | 6057 } } // namespace v8::internal |
| OLD | NEW |