OLD | NEW |
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 7297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7308 return ToApiHandle<String>( | 7308 return ToApiHandle<String>( |
7309 isolate->factory()->InternalizeUtf8String(entry->name())); | 7309 isolate->factory()->InternalizeUtf8String(entry->name())); |
7310 } else { | 7310 } else { |
7311 return ToApiHandle<String>(isolate->factory()->NewConsString( | 7311 return ToApiHandle<String>(isolate->factory()->NewConsString( |
7312 isolate->factory()->InternalizeUtf8String(entry->name_prefix()), | 7312 isolate->factory()->InternalizeUtf8String(entry->name_prefix()), |
7313 isolate->factory()->InternalizeUtf8String(entry->name()))); | 7313 isolate->factory()->InternalizeUtf8String(entry->name()))); |
7314 } | 7314 } |
7315 } | 7315 } |
7316 | 7316 |
7317 | 7317 |
| 7318 int CpuProfileNode::GetScriptId() const { |
| 7319 i::Isolate* isolate = i::Isolate::Current(); |
| 7320 IsDeadCheck(isolate, "v8::CpuProfileNode::GetScriptId"); |
| 7321 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this); |
| 7322 const i::CodeEntry* entry = node->entry(); |
| 7323 return entry->script_id(); |
| 7324 } |
| 7325 |
| 7326 |
7318 Handle<String> CpuProfileNode::GetScriptResourceName() const { | 7327 Handle<String> CpuProfileNode::GetScriptResourceName() const { |
7319 i::Isolate* isolate = i::Isolate::Current(); | 7328 i::Isolate* isolate = i::Isolate::Current(); |
7320 IsDeadCheck(isolate, "v8::CpuProfileNode::GetScriptResourceName"); | 7329 IsDeadCheck(isolate, "v8::CpuProfileNode::GetScriptResourceName"); |
7321 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this); | 7330 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this); |
7322 return ToApiHandle<String>(isolate->factory()->InternalizeUtf8String( | 7331 return ToApiHandle<String>(isolate->factory()->InternalizeUtf8String( |
7323 node->entry()->resource_name())); | 7332 node->entry()->resource_name())); |
7324 } | 7333 } |
7325 | 7334 |
7326 | 7335 |
7327 int CpuProfileNode::GetLineNumber() const { | 7336 int CpuProfileNode::GetLineNumber() const { |
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8019 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 8028 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
8020 Address callback_address = | 8029 Address callback_address = |
8021 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8030 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
8022 VMState<EXTERNAL> state(isolate); | 8031 VMState<EXTERNAL> state(isolate); |
8023 ExternalCallbackScope call_scope(isolate, callback_address); | 8032 ExternalCallbackScope call_scope(isolate, callback_address); |
8024 return callback(info); | 8033 return callback(info); |
8025 } | 8034 } |
8026 | 8035 |
8027 | 8036 |
8028 } } // namespace v8::internal | 8037 } } // namespace v8::internal |
OLD | NEW |