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

Side by Side Diff: src/api.cc

Issue 17642009: CPUProfiler: propagate scriptId to the front-end (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: unnecessary line was removed 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 7236 matching lines...) Expand 10 before | Expand all | Expand 10 after
7247 return ToApiHandle<String>( 7247 return ToApiHandle<String>(
7248 isolate->factory()->InternalizeUtf8String(entry->name())); 7248 isolate->factory()->InternalizeUtf8String(entry->name()));
7249 } else { 7249 } else {
7250 return ToApiHandle<String>(isolate->factory()->NewConsString( 7250 return ToApiHandle<String>(isolate->factory()->NewConsString(
7251 isolate->factory()->InternalizeUtf8String(entry->name_prefix()), 7251 isolate->factory()->InternalizeUtf8String(entry->name_prefix()),
7252 isolate->factory()->InternalizeUtf8String(entry->name()))); 7252 isolate->factory()->InternalizeUtf8String(entry->name())));
7253 } 7253 }
7254 } 7254 }
7255 7255
7256 7256
7257 int CpuProfileNode::GetScriptId() const {
7258 i::Isolate* isolate = i::Isolate::Current();
7259 IsDeadCheck(isolate, "v8::CpuProfileNode::GetScriptId");
7260 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
7261 const i::CodeEntry* entry = node->entry();
7262 return entry->script_id();
7263 }
7264
7265
7257 Handle<String> CpuProfileNode::GetScriptResourceName() const { 7266 Handle<String> CpuProfileNode::GetScriptResourceName() const {
7258 i::Isolate* isolate = i::Isolate::Current(); 7267 i::Isolate* isolate = i::Isolate::Current();
7259 IsDeadCheck(isolate, "v8::CpuProfileNode::GetScriptResourceName"); 7268 IsDeadCheck(isolate, "v8::CpuProfileNode::GetScriptResourceName");
7260 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this); 7269 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
7261 return ToApiHandle<String>(isolate->factory()->InternalizeUtf8String( 7270 return ToApiHandle<String>(isolate->factory()->InternalizeUtf8String(
7262 node->entry()->resource_name())); 7271 node->entry()->resource_name()));
7263 } 7272 }
7264 7273
7265 7274
7266 int CpuProfileNode::GetLineNumber() const { 7275 int CpuProfileNode::GetLineNumber() const {
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
7958 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 7967 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7959 Address callback_address = 7968 Address callback_address =
7960 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 7969 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
7961 VMState<EXTERNAL> state(isolate); 7970 VMState<EXTERNAL> state(isolate);
7962 ExternalCallbackScope call_scope(isolate, callback_address); 7971 ExternalCallbackScope call_scope(isolate, callback_address);
7963 return callback(info); 7972 return callback(info);
7964 } 7973 }
7965 7974
7966 7975
7967 } } // namespace v8::internal 7976 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698