Chromium Code Reviews| Index: src/cpu-profiler.cc |
| diff --git a/src/cpu-profiler.cc b/src/cpu-profiler.cc |
| index 109ddd5d976f0a36ccdb1512e02b2a78467238d6..0c29fb858ce3f088cf83f3a716d4330c5cb68971 100644 |
| --- a/src/cpu-profiler.cc |
| +++ b/src/cpu-profiler.cc |
| @@ -89,7 +89,13 @@ void ProfilerEventsProcessor::CodeCreateEvent(Logger::LogEventsAndTags tag, |
| rec->type = CodeEventRecord::CODE_CREATION; |
| rec->order = ++enqueue_order_; |
| rec->start = start; |
| - rec->entry = profiles_->NewCodeEntry(tag, name, resource_name, line_number); |
| + int script_id = v8::CpuProfileNode::kNoScriptId; |
| + if (info) { |
| + Object* id = info->script()->id(); |
| + script_id = Smi::cast(id)->value(); |
| + } |
|
yurys
2013/06/25 09:16:55
In case when there are no |info| you may still be
|
| + rec->entry = profiles_->NewCodeEntry(tag, name, script_id, |
| + resource_name, line_number); |
| if (info) { |
| rec->entry->set_no_frame_ranges(info->ReleaseNoFrameRanges()); |
| } |