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

Side by Side Diff: src/api.cc

Issue 145353003: Allow arbitrary names for weak references in heap snapshots. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Reupload Created 6 years, 11 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.h » ('j') | src/heap-snapshot-generator.cc » ('J')
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 6926 matching lines...) Expand 10 before | Expand all | Expand 10 after
6937 6937
6938 6938
6939 Handle<Value> HeapGraphEdge::GetName() const { 6939 Handle<Value> HeapGraphEdge::GetName() const {
6940 i::Isolate* isolate = i::Isolate::Current(); 6940 i::Isolate* isolate = i::Isolate::Current();
6941 i::HeapGraphEdge* edge = ToInternal(this); 6941 i::HeapGraphEdge* edge = ToInternal(this);
6942 switch (edge->type()) { 6942 switch (edge->type()) {
6943 case i::HeapGraphEdge::kContextVariable: 6943 case i::HeapGraphEdge::kContextVariable:
6944 case i::HeapGraphEdge::kInternal: 6944 case i::HeapGraphEdge::kInternal:
6945 case i::HeapGraphEdge::kProperty: 6945 case i::HeapGraphEdge::kProperty:
6946 case i::HeapGraphEdge::kShortcut: 6946 case i::HeapGraphEdge::kShortcut:
6947 case i::HeapGraphEdge::kWeak:
6947 return ToApiHandle<String>( 6948 return ToApiHandle<String>(
6948 isolate->factory()->InternalizeUtf8String(edge->name())); 6949 isolate->factory()->InternalizeUtf8String(edge->name()));
6949 case i::HeapGraphEdge::kElement: 6950 case i::HeapGraphEdge::kElement:
6950 case i::HeapGraphEdge::kHidden: 6951 case i::HeapGraphEdge::kHidden:
6951 case i::HeapGraphEdge::kWeak:
6952 return ToApiHandle<Number>( 6952 return ToApiHandle<Number>(
6953 isolate->factory()->NewNumberFromInt(edge->index())); 6953 isolate->factory()->NewNumberFromInt(edge->index()));
6954 default: UNREACHABLE(); 6954 default: UNREACHABLE();
6955 } 6955 }
6956 return v8::Undefined(reinterpret_cast<v8::Isolate*>(isolate)); 6956 return v8::Undefined(reinterpret_cast<v8::Isolate*>(isolate));
6957 } 6957 }
6958 6958
6959 6959
6960 const HeapGraphNode* HeapGraphEdge::GetFromNode() const { 6960 const HeapGraphNode* HeapGraphEdge::GetFromNode() const {
6961 const i::HeapEntry* from = ToInternal(this)->from(); 6961 const i::HeapEntry* from = ToInternal(this)->from();
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
7392 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 7392 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7393 Address callback_address = 7393 Address callback_address =
7394 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 7394 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
7395 VMState<EXTERNAL> state(isolate); 7395 VMState<EXTERNAL> state(isolate);
7396 ExternalCallbackScope call_scope(isolate, callback_address); 7396 ExternalCallbackScope call_scope(isolate, callback_address);
7397 callback(info); 7397 callback(info);
7398 } 7398 }
7399 7399
7400 7400
7401 } } // namespace v8::internal 7401 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/heap-snapshot-generator.h » ('j') | src/heap-snapshot-generator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698