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

Side by Side Diff: src/profiler/heap-snapshot-generator.cc

Issue 1413463006: Map v8::Object to v8::internal::JSReceiver (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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
« src/api.cc ('K') | « src/objects.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/profiler/heap-snapshot-generator.h" 5 #include "src/profiler/heap-snapshot-generator.h"
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/conversions.h" 8 #include "src/conversions.h"
9 #include "src/debug/debug.h" 9 #include "src/debug/debug.h"
10 #include "src/profiler/allocation-tracker.h" 10 #include "src/profiler/allocation-tracker.h"
(...skipping 2204 matching lines...) Expand 10 before | Expand all | Expand 10 after
2215 Isolate* isolate = heap_->isolate(); 2215 Isolate* isolate = heap_->isolate();
2216 HandleScope scope(isolate); 2216 HandleScope scope(isolate);
2217 GlobalObjectsEnumerator enumerator; 2217 GlobalObjectsEnumerator enumerator;
2218 isolate->global_handles()->IterateAllRoots(&enumerator); 2218 isolate->global_handles()->IterateAllRoots(&enumerator);
2219 const char** urls = NewArray<const char*>(enumerator.count()); 2219 const char** urls = NewArray<const char*>(enumerator.count());
2220 for (int i = 0, l = enumerator.count(); i < l; ++i) { 2220 for (int i = 0, l = enumerator.count(); i < l; ++i) {
2221 if (global_object_name_resolver_) { 2221 if (global_object_name_resolver_) {
2222 HandleScope scope(isolate); 2222 HandleScope scope(isolate);
2223 Handle<JSGlobalObject> global_obj = enumerator.at(i); 2223 Handle<JSGlobalObject> global_obj = enumerator.at(i);
2224 urls[i] = global_object_name_resolver_->GetName( 2224 urls[i] = global_object_name_resolver_->GetName(
2225 Utils::ToLocal(Handle<JSObject>::cast(global_obj))); 2225 Utils::ReceiverToLocal(Handle<JSObject>::cast(global_obj)));
2226 } else { 2226 } else {
2227 urls[i] = NULL; 2227 urls[i] = NULL;
2228 } 2228 }
2229 } 2229 }
2230 2230
2231 DisallowHeapAllocation no_allocation; 2231 DisallowHeapAllocation no_allocation;
2232 for (int i = 0, l = enumerator.count(); i < l; ++i) { 2232 for (int i = 0, l = enumerator.count(); i < l; ++i) {
2233 objects_tags_.SetTag(*enumerator.at(i), urls[i]); 2233 objects_tags_.SetTag(*enumerator.at(i), urls[i]);
2234 } 2234 }
2235 2235
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after
3169 for (int i = 1; i < sorted_strings.length(); ++i) { 3169 for (int i = 1; i < sorted_strings.length(); ++i) {
3170 writer_->AddCharacter(','); 3170 writer_->AddCharacter(',');
3171 SerializeString(sorted_strings[i]); 3171 SerializeString(sorted_strings[i]);
3172 if (writer_->aborted()) return; 3172 if (writer_->aborted()) return;
3173 } 3173 }
3174 } 3174 }
3175 3175
3176 3176
3177 } // namespace internal 3177 } // namespace internal
3178 } // namespace v8 3178 } // namespace v8
OLDNEW
« src/api.cc ('K') | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698