Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: src/api.cc

Issue 9858010: Complete switch to SnapshotObjectId. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: static_cast changed to int32_t Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 6001 matching lines...) Expand 10 before | Expand all | Expand 10 after
6012 6012
6013 6013
6014 Handle<String> HeapGraphNode::GetName() const { 6014 Handle<String> HeapGraphNode::GetName() const {
6015 i::Isolate* isolate = i::Isolate::Current(); 6015 i::Isolate* isolate = i::Isolate::Current();
6016 IsDeadCheck(isolate, "v8::HeapGraphNode::GetName"); 6016 IsDeadCheck(isolate, "v8::HeapGraphNode::GetName");
6017 return Handle<String>(ToApi<String>(isolate->factory()->LookupAsciiSymbol( 6017 return Handle<String>(ToApi<String>(isolate->factory()->LookupAsciiSymbol(
6018 ToInternal(this)->name()))); 6018 ToInternal(this)->name())));
6019 } 6019 }
6020 6020
6021 6021
6022 uint64_t HeapGraphNode::GetId() const { 6022 SnapshotObjectId HeapGraphNode::GetId() const {
6023 i::Isolate* isolate = i::Isolate::Current(); 6023 i::Isolate* isolate = i::Isolate::Current();
6024 IsDeadCheck(isolate, "v8::HeapGraphNode::GetId"); 6024 IsDeadCheck(isolate, "v8::HeapGraphNode::GetId");
6025 return ToInternal(this)->id(); 6025 return ToInternal(this)->id();
6026 } 6026 }
6027 6027
6028 6028
6029 int HeapGraphNode::GetSelfSize() const { 6029 int HeapGraphNode::GetSelfSize() const {
6030 i::Isolate* isolate = i::Isolate::Current(); 6030 i::Isolate* isolate = i::Isolate::Current();
6031 IsDeadCheck(isolate, "v8::HeapGraphNode::GetSelfSize"); 6031 IsDeadCheck(isolate, "v8::HeapGraphNode::GetSelfSize");
6032 return ToInternal(this)->self_size(); 6032 return ToInternal(this)->self_size();
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
6127 } 6127 }
6128 6128
6129 6129
6130 const HeapGraphNode* HeapSnapshot::GetRoot() const { 6130 const HeapGraphNode* HeapSnapshot::GetRoot() const {
6131 i::Isolate* isolate = i::Isolate::Current(); 6131 i::Isolate* isolate = i::Isolate::Current();
6132 IsDeadCheck(isolate, "v8::HeapSnapshot::GetHead"); 6132 IsDeadCheck(isolate, "v8::HeapSnapshot::GetHead");
6133 return reinterpret_cast<const HeapGraphNode*>(ToInternal(this)->root()); 6133 return reinterpret_cast<const HeapGraphNode*>(ToInternal(this)->root());
6134 } 6134 }
6135 6135
6136 6136
6137 const HeapGraphNode* HeapSnapshot::GetNodeById(uint64_t id) const { 6137 const HeapGraphNode* HeapSnapshot::GetNodeById(SnapshotObjectId id) const {
6138 i::Isolate* isolate = i::Isolate::Current(); 6138 i::Isolate* isolate = i::Isolate::Current();
6139 IsDeadCheck(isolate, "v8::HeapSnapshot::GetNodeById"); 6139 IsDeadCheck(isolate, "v8::HeapSnapshot::GetNodeById");
6140 return reinterpret_cast<const HeapGraphNode*>( 6140 return reinterpret_cast<const HeapGraphNode*>(
6141 ToInternal(this)->GetEntryById(static_cast<i::SnapshotObjectId>(id))); 6141 ToInternal(this)->GetEntryById(id));
6142 } 6142 }
6143 6143
6144 6144
6145 int HeapSnapshot::GetNodesCount() const { 6145 int HeapSnapshot::GetNodesCount() const {
6146 i::Isolate* isolate = i::Isolate::Current(); 6146 i::Isolate* isolate = i::Isolate::Current();
6147 IsDeadCheck(isolate, "v8::HeapSnapshot::GetNodesCount"); 6147 IsDeadCheck(isolate, "v8::HeapSnapshot::GetNodesCount");
6148 return ToInternal(this)->entries()->length(); 6148 return ToInternal(this)->entries()->length();
6149 } 6149 }
6150 6150
6151 6151
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
6359 6359
6360 6360
6361 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { 6361 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) {
6362 HandleScopeImplementer* scope_implementer = 6362 HandleScopeImplementer* scope_implementer =
6363 reinterpret_cast<HandleScopeImplementer*>(storage); 6363 reinterpret_cast<HandleScopeImplementer*>(storage);
6364 scope_implementer->IterateThis(v); 6364 scope_implementer->IterateThis(v);
6365 return storage + ArchiveSpacePerThread(); 6365 return storage + ArchiveSpacePerThread();
6366 } 6366 }
6367 6367
6368 } } // namespace v8::internal 6368 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698