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

Side by Side Diff: src/objects.cc

Issue 3590029: Better align heap snapshots contents with debugger info. (Closed)
Patch Set: Created 10 years, 2 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
« no previous file with comments | « include/v8-profiler.h ('k') | src/profile-generator.h » ('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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after
1173 } 1173 }
1174 1174
1175 1175
1176 String* JSObject::constructor_name() { 1176 String* JSObject::constructor_name() {
1177 if (IsJSFunction()) { 1177 if (IsJSFunction()) {
1178 return Heap::closure_symbol(); 1178 return Heap::closure_symbol();
1179 } 1179 }
1180 if (map()->constructor()->IsJSFunction()) { 1180 if (map()->constructor()->IsJSFunction()) {
1181 JSFunction* constructor = JSFunction::cast(map()->constructor()); 1181 JSFunction* constructor = JSFunction::cast(map()->constructor());
1182 String* name = String::cast(constructor->shared()->name()); 1182 String* name = String::cast(constructor->shared()->name());
1183 return name->length() > 0 ? name : constructor->shared()->inferred_name(); 1183 if (name->length() > 0) return name;
1184 String* inferred_name = constructor->shared()->inferred_name();
1185 if (inferred_name->length() > 0) return inferred_name;
1186 Object* proto = GetPrototype();
1187 if (proto->IsJSObject()) return JSObject::cast(proto)->constructor_name();
1184 } 1188 }
1185 // If the constructor is not present, return "Object". 1189 // If the constructor is not present, return "Object".
1186 return Heap::Object_symbol(); 1190 return Heap::Object_symbol();
1187 } 1191 }
1188 1192
1189 1193
1190 Object* JSObject::AddFastPropertyUsingMap(Map* new_map, 1194 Object* JSObject::AddFastPropertyUsingMap(Map* new_map,
1191 String* name, 1195 String* name,
1192 Object* value) { 1196 Object* value) {
1193 int index = new_map->PropertyIndexFor(name); 1197 int index = new_map->PropertyIndexFor(name);
(...skipping 7862 matching lines...) Expand 10 before | Expand all | Expand 10 after
9056 if (break_point_objects()->IsUndefined()) return 0; 9060 if (break_point_objects()->IsUndefined()) return 0;
9057 // Single beak point. 9061 // Single beak point.
9058 if (!break_point_objects()->IsFixedArray()) return 1; 9062 if (!break_point_objects()->IsFixedArray()) return 1;
9059 // Multiple break points. 9063 // Multiple break points.
9060 return FixedArray::cast(break_point_objects())->length(); 9064 return FixedArray::cast(break_point_objects())->length();
9061 } 9065 }
9062 #endif 9066 #endif
9063 9067
9064 9068
9065 } } // namespace v8::internal 9069 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8-profiler.h ('k') | src/profile-generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698