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

Unified Diff: src/cpu-profiler.cc

Issue 18332010: Revert "CPUProfiler: propagate scriptId to the front-end" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/api.cc ('k') | src/profile-generator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cpu-profiler.cc
diff --git a/src/cpu-profiler.cc b/src/cpu-profiler.cc
index 55d81213e09b232037117b951fca80b31238ed47..270da8fc9774ec88484d4ec1c19260baaef9985b 100644
--- a/src/cpu-profiler.cc
+++ b/src/cpu-profiler.cc
@@ -255,12 +255,9 @@ void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag,
CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_;
rec->start = code->address();
rec->entry = profiles_->NewCodeEntry(tag, profiles_->GetFunctionName(name));
- if (info) {
- rec->entry->set_no_frame_ranges(info->ReleaseNoFrameRanges());
- }
- ASSERT(Script::cast(shared->script()));
- Script* script = Script::cast(shared->script());
- rec->entry->set_script_id(script->id()->value());
+ rec->entry->set_no_frame_ranges(info ?
+ info->ReleaseNoFrameRanges() :
+ NULL);
rec->size = code->ExecutableSize();
rec->shared = shared->address();
processor_->Enqueue(evt_rec);
@@ -283,12 +280,9 @@ void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag,
CodeEntry::kEmptyNamePrefix,
profiles_->GetName(source),
line);
- if (info) {
- rec->entry->set_no_frame_ranges(info->ReleaseNoFrameRanges());
- }
- ASSERT(Script::cast(shared->script()));
- Script* script = Script::cast(shared->script());
- rec->entry->set_script_id(script->id()->value());
+ rec->entry->set_no_frame_ranges(info ?
+ info->ReleaseNoFrameRanges() :
+ NULL);
rec->size = code->ExecutableSize();
rec->shared = shared->address();
processor_->Enqueue(evt_rec);
« no previous file with comments | « src/api.cc ('k') | src/profile-generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698