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 6139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6150 | 6150 |
6151 | 6151 |
6152 const HeapGraphNode* HeapSnapshot::GetNode(int index) const { | 6152 const HeapGraphNode* HeapSnapshot::GetNode(int index) const { |
6153 i::Isolate* isolate = i::Isolate::Current(); | 6153 i::Isolate* isolate = i::Isolate::Current(); |
6154 IsDeadCheck(isolate, "v8::HeapSnapshot::GetNode"); | 6154 IsDeadCheck(isolate, "v8::HeapSnapshot::GetNode"); |
6155 return reinterpret_cast<const HeapGraphNode*>( | 6155 return reinterpret_cast<const HeapGraphNode*>( |
6156 ToInternal(this)->entries()->at(index)); | 6156 ToInternal(this)->entries()->at(index)); |
6157 } | 6157 } |
6158 | 6158 |
6159 | 6159 |
6160 SnapshotObjectId HeapSnapshot::GetMaxSnapshotJSObjectId() const { | |
6161 i::Isolate* isolate = i::Isolate::Current(); | |
6162 IsDeadCheck(isolate, "v8::HeapSnapshot::GetMaxSnapshotJSObjectId"); | |
6163 return ToInternal(this)->max_snapshot_js_object_id(); | |
6164 } | |
6165 | |
6166 | |
6167 void HeapSnapshot::Serialize(OutputStream* stream, | 6160 void HeapSnapshot::Serialize(OutputStream* stream, |
6168 HeapSnapshot::SerializationFormat format) const { | 6161 HeapSnapshot::SerializationFormat format) const { |
6169 i::Isolate* isolate = i::Isolate::Current(); | 6162 i::Isolate* isolate = i::Isolate::Current(); |
6170 IsDeadCheck(isolate, "v8::HeapSnapshot::Serialize"); | 6163 IsDeadCheck(isolate, "v8::HeapSnapshot::Serialize"); |
6171 ApiCheck(format == kJSON, | 6164 ApiCheck(format == kJSON, |
6172 "v8::HeapSnapshot::Serialize", | 6165 "v8::HeapSnapshot::Serialize", |
6173 "Unknown serialization format"); | 6166 "Unknown serialization format"); |
6174 ApiCheck(stream->GetOutputEncoding() == OutputStream::kAscii, | 6167 ApiCheck(stream->GetOutputEncoding() == OutputStream::kAscii, |
6175 "v8::HeapSnapshot::Serialize", | 6168 "v8::HeapSnapshot::Serialize", |
6176 "Unsupported output encoding"); | 6169 "Unsupported output encoding"); |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6366 | 6359 |
6367 | 6360 |
6368 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 6361 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
6369 HandleScopeImplementer* scope_implementer = | 6362 HandleScopeImplementer* scope_implementer = |
6370 reinterpret_cast<HandleScopeImplementer*>(storage); | 6363 reinterpret_cast<HandleScopeImplementer*>(storage); |
6371 scope_implementer->IterateThis(v); | 6364 scope_implementer->IterateThis(v); |
6372 return storage + ArchiveSpacePerThread(); | 6365 return storage + ArchiveSpacePerThread(); |
6373 } | 6366 } |
6374 | 6367 |
6375 } } // namespace v8::internal | 6368 } } // namespace v8::internal |
OLD | NEW |