| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010, Google Inc. All rights reserved. | 2 * Copyright (c) 2010, Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 { | 48 { |
| 49 v8::HandleScope scope; | 49 v8::HandleScope scope; |
| 50 return toWebCoreString(m_profile->GetTitle()); | 50 return toWebCoreString(m_profile->GetTitle()); |
| 51 } | 51 } |
| 52 | 52 |
| 53 unsigned int ScriptProfile::uid() const | 53 unsigned int ScriptProfile::uid() const |
| 54 { | 54 { |
| 55 return m_profile->GetUid(); | 55 return m_profile->GetUid(); |
| 56 } | 56 } |
| 57 | 57 |
| 58 PassRefPtr<ScriptProfileNode> ScriptProfile::head() const | |
| 59 { | |
| 60 return ScriptProfileNode::create(m_profile->GetTopDownRoot()); | |
| 61 } | |
| 62 | |
| 63 double ScriptProfile::idleTime() const | 58 double ScriptProfile::idleTime() const |
| 64 { | 59 { |
| 65 return m_idleTime; | 60 return m_idleTime; |
| 66 } | 61 } |
| 67 | 62 |
| 68 static PassRefPtr<TypeBuilder::Profiler::CPUProfileNode> buildInspectorObjectFor
(const v8::CpuProfileNode* node) | 63 static PassRefPtr<TypeBuilder::Profiler::CPUProfileNode> buildInspectorObjectFor
(const v8::CpuProfileNode* node) |
| 69 { | 64 { |
| 70 v8::HandleScope handleScope; | 65 v8::HandleScope handleScope; |
| 71 | 66 |
| 72 RefPtr<TypeBuilder::Array<TypeBuilder::Profiler::CPUProfileNode> > children
= TypeBuilder::Array<TypeBuilder::Profiler::CPUProfileNode>::create(); | 67 RefPtr<TypeBuilder::Array<TypeBuilder::Profiler::CPUProfileNode> > children
= TypeBuilder::Array<TypeBuilder::Profiler::CPUProfileNode>::create(); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 99 { | 94 { |
| 100 RefPtr<TypeBuilder::Array<int> > array = TypeBuilder::Array<int>::create(); | 95 RefPtr<TypeBuilder::Array<int> > array = TypeBuilder::Array<int>::create(); |
| 101 int count = m_profile->GetSamplesCount(); | 96 int count = m_profile->GetSamplesCount(); |
| 102 for (int i = 0; i < count; i++) | 97 for (int i = 0; i < count; i++) |
| 103 array->addItem(m_profile->GetSample(i)->GetNodeId()); | 98 array->addItem(m_profile->GetSample(i)->GetNodeId()); |
| 104 return array.release(); | 99 return array.release(); |
| 105 } | 100 } |
| 106 | 101 |
| 107 | 102 |
| 108 } // namespace WebCore | 103 } // namespace WebCore |
| OLD | NEW |