| OLD | NEW |
| 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/allocation-tracker.h" | 5 #include "src/allocation-tracker.h" |
| 6 | 6 |
| 7 #include "src/frames-inl.h" | 7 #include "src/frames-inl.h" |
| 8 #include "src/heap-snapshot-generator-inl.h" | 8 #include "src/heap-snapshot-generator-inl.h" |
| 9 #include "src/objects-inl.h" | 9 #include "src/objects-inl.h" |
| 10 | 10 |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 if (entry->value == NULL) { | 266 if (entry->value == NULL) { |
| 267 FunctionInfo* info = new FunctionInfo(); | 267 FunctionInfo* info = new FunctionInfo(); |
| 268 info->name = names_->GetFunctionName(shared->DebugName()); | 268 info->name = names_->GetFunctionName(shared->DebugName()); |
| 269 info->function_id = id; | 269 info->function_id = id; |
| 270 if (shared->script()->IsScript()) { | 270 if (shared->script()->IsScript()) { |
| 271 Script* script = Script::cast(shared->script()); | 271 Script* script = Script::cast(shared->script()); |
| 272 if (script->name()->IsName()) { | 272 if (script->name()->IsName()) { |
| 273 Name* name = Name::cast(script->name()); | 273 Name* name = Name::cast(script->name()); |
| 274 info->script_name = names_->GetName(name); | 274 info->script_name = names_->GetName(name); |
| 275 } | 275 } |
| 276 info->script_id = script->id()->value(); | 276 info->script_id = script->id(); |
| 277 // Converting start offset into line and column may cause heap | 277 // Converting start offset into line and column may cause heap |
| 278 // allocations so we postpone them until snapshot serialization. | 278 // allocations so we postpone them until snapshot serialization. |
| 279 unresolved_locations_.Add(new UnresolvedLocation( | 279 unresolved_locations_.Add(new UnresolvedLocation( |
| 280 script, | 280 script, |
| 281 shared->start_position(), | 281 shared->start_position(), |
| 282 info)); | 282 info)); |
| 283 } | 283 } |
| 284 entry->value = reinterpret_cast<void*>(function_info_list_.length()); | 284 entry->value = reinterpret_cast<void*>(function_info_list_.length()); |
| 285 function_info_list_.Add(info); | 285 function_info_list_.Add(info); |
| 286 } | 286 } |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 const v8::WeakCallbackData<v8::Value, void>& data) { | 331 const v8::WeakCallbackData<v8::Value, void>& data) { |
| 332 UnresolvedLocation* loc = | 332 UnresolvedLocation* loc = |
| 333 reinterpret_cast<UnresolvedLocation*>(data.GetParameter()); | 333 reinterpret_cast<UnresolvedLocation*>(data.GetParameter()); |
| 334 GlobalHandles::Destroy(reinterpret_cast<Object**>(loc->script_.location())); | 334 GlobalHandles::Destroy(reinterpret_cast<Object**>(loc->script_.location())); |
| 335 loc->script_ = Handle<Script>::null(); | 335 loc->script_ = Handle<Script>::null(); |
| 336 } | 336 } |
| 337 | 337 |
| 338 | 338 |
| 339 } // namespace internal | 339 } // namespace internal |
| 340 } // namespace v8 | 340 } // namespace v8 |
| OLD | NEW |