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

Side by Side Diff: src/api.cc

Issue 19397002: Provide named links to code objects in heap snapshot. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add missing edge type to GetName API. Wondering how it worked before??? Created 7 years, 5 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
« no previous file with comments | « no previous file | src/heap-snapshot-generator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7538 matching lines...) Expand 10 before | Expand all | Expand 10 after
7549 i::HeapGraphEdge* edge = ToInternal(this); 7549 i::HeapGraphEdge* edge = ToInternal(this);
7550 switch (edge->type()) { 7550 switch (edge->type()) {
7551 case i::HeapGraphEdge::kContextVariable: 7551 case i::HeapGraphEdge::kContextVariable:
7552 case i::HeapGraphEdge::kInternal: 7552 case i::HeapGraphEdge::kInternal:
7553 case i::HeapGraphEdge::kProperty: 7553 case i::HeapGraphEdge::kProperty:
7554 case i::HeapGraphEdge::kShortcut: 7554 case i::HeapGraphEdge::kShortcut:
7555 return ToApiHandle<String>( 7555 return ToApiHandle<String>(
7556 isolate->factory()->InternalizeUtf8String(edge->name())); 7556 isolate->factory()->InternalizeUtf8String(edge->name()));
7557 case i::HeapGraphEdge::kElement: 7557 case i::HeapGraphEdge::kElement:
7558 case i::HeapGraphEdge::kHidden: 7558 case i::HeapGraphEdge::kHidden:
7559 case i::HeapGraphEdge::kWeak:
7559 return ToApiHandle<Number>( 7560 return ToApiHandle<Number>(
7560 isolate->factory()->NewNumberFromInt(edge->index())); 7561 isolate->factory()->NewNumberFromInt(edge->index()));
7561 default: UNREACHABLE(); 7562 default: UNREACHABLE();
7562 } 7563 }
7563 return v8::Undefined(); 7564 return v8::Undefined();
7564 } 7565 }
7565 7566
7566 7567
7567 const HeapGraphNode* HeapGraphEdge::GetFromNode() const { 7568 const HeapGraphNode* HeapGraphEdge::GetFromNode() const {
7568 i::Isolate* isolate = i::Isolate::Current(); 7569 i::Isolate* isolate = i::Isolate::Current();
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
8052 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 8053 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
8053 Address callback_address = 8054 Address callback_address =
8054 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 8055 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
8055 VMState<EXTERNAL> state(isolate); 8056 VMState<EXTERNAL> state(isolate);
8056 ExternalCallbackScope call_scope(isolate, callback_address); 8057 ExternalCallbackScope call_scope(isolate, callback_address);
8057 return callback(info); 8058 return callback(info);
8058 } 8059 }
8059 8060
8060 8061
8061 } } // namespace v8::internal 8062 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/heap-snapshot-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698