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 7308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7319 return ToApiHandle<String>( | 7319 return ToApiHandle<String>( |
7320 isolate->factory()->InternalizeUtf8String(entry->name())); | 7320 isolate->factory()->InternalizeUtf8String(entry->name())); |
7321 } else { | 7321 } else { |
7322 return ToApiHandle<String>(isolate->factory()->NewConsString( | 7322 return ToApiHandle<String>(isolate->factory()->NewConsString( |
7323 isolate->factory()->InternalizeUtf8String(entry->name_prefix()), | 7323 isolate->factory()->InternalizeUtf8String(entry->name_prefix()), |
7324 isolate->factory()->InternalizeUtf8String(entry->name()))); | 7324 isolate->factory()->InternalizeUtf8String(entry->name()))); |
7325 } | 7325 } |
7326 } | 7326 } |
7327 | 7327 |
7328 | 7328 |
| 7329 int CpuProfileNode::GetScriptId() const { |
| 7330 i::Isolate* isolate = i::Isolate::Current(); |
| 7331 IsDeadCheck(isolate, "v8::CpuProfileNode::GetScriptId"); |
| 7332 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this); |
| 7333 const i::CodeEntry* entry = node->entry(); |
| 7334 return entry->script_id(); |
| 7335 } |
| 7336 |
| 7337 |
7329 Handle<String> CpuProfileNode::GetScriptResourceName() const { | 7338 Handle<String> CpuProfileNode::GetScriptResourceName() const { |
7330 i::Isolate* isolate = i::Isolate::Current(); | 7339 i::Isolate* isolate = i::Isolate::Current(); |
7331 IsDeadCheck(isolate, "v8::CpuProfileNode::GetScriptResourceName"); | 7340 IsDeadCheck(isolate, "v8::CpuProfileNode::GetScriptResourceName"); |
7332 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this); | 7341 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this); |
7333 return ToApiHandle<String>(isolate->factory()->InternalizeUtf8String( | 7342 return ToApiHandle<String>(isolate->factory()->InternalizeUtf8String( |
7334 node->entry()->resource_name())); | 7343 node->entry()->resource_name())); |
7335 } | 7344 } |
7336 | 7345 |
7337 | 7346 |
7338 int CpuProfileNode::GetLineNumber() const { | 7347 int CpuProfileNode::GetLineNumber() const { |
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8030 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 8039 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
8031 Address callback_address = | 8040 Address callback_address = |
8032 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8041 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
8033 VMState<EXTERNAL> state(isolate); | 8042 VMState<EXTERNAL> state(isolate); |
8034 ExternalCallbackScope call_scope(isolate, callback_address); | 8043 ExternalCallbackScope call_scope(isolate, callback_address); |
8035 return callback(info); | 8044 return callback(info); |
8036 } | 8045 } |
8037 | 8046 |
8038 | 8047 |
8039 } } // namespace v8::internal | 8048 } } // namespace v8::internal |
OLD | NEW |