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

Unified Diff: src/api.cc

Issue 8046006: Add v8::HeapGraphNode::GetHeapValue method. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 6a58417879c438d84d85ae26424f6c421e5b395d..7ae01d14e4021ea450d1e21c561b723a199e7ce2 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -5811,6 +5811,16 @@ const HeapGraphNode* HeapGraphNode::GetDominatorNode() const {
}
+v8::Handle<v8::Value> HeapGraphNode::GetHeapValue() const {
+ i::Isolate* isolate = i::Isolate::Current();
+ IsDeadCheck(isolate, "v8::HeapGraphNode::GetHeapValue");
+ i::Handle<i::HeapObject> object = ToInternal(this)->GetHeapObject();
+ return v8::Handle<Value>(!object.is_null() ?
+ ToApi<Value>(object) : ToApi<Value>(
+ isolate->factory()->undefined_value()));
+}
+
+
static i::HeapSnapshot* ToInternal(const HeapSnapshot* snapshot) {
return const_cast<i::HeapSnapshot*>(
reinterpret_cast<const i::HeapSnapshot*>(snapshot));
« no previous file with comments | « include/v8-profiler.h ('k') | src/profile-generator.h » ('j') | src/profile-generator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698