| 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 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 #include "bindings/v8/V8Binding.h" | 34 #include "bindings/v8/V8Binding.h" |
| 35 #include <v8-profiler.h> | 35 #include <v8-profiler.h> |
| 36 #include "wtf/PassRefPtr.h" | 36 #include "wtf/PassRefPtr.h" |
| 37 #include "wtf/RefPtr.h" | 37 #include "wtf/RefPtr.h" |
| 38 | 38 |
| 39 namespace WebCore { | 39 namespace WebCore { |
| 40 | 40 |
| 41 ScriptProfile::~ScriptProfile() | 41 ScriptProfile::~ScriptProfile() |
| 42 { | 42 { |
| 43 const_cast<v8::CpuProfile*>(m_profile)->Delete(); | 43 m_profile->Delete(); |
| 44 } | 44 } |
| 45 | 45 |
| 46 String ScriptProfile::title() const | 46 String ScriptProfile::title() const |
| 47 { | 47 { |
| 48 v8::HandleScope scope(v8::Isolate::GetCurrent()); | 48 v8::HandleScope scope(v8::Isolate::GetCurrent()); |
| 49 return toCoreString(m_profile->GetTitle()); | 49 return toCoreString(m_profile->GetTitle()); |
| 50 } | 50 } |
| 51 | 51 |
| 52 double ScriptProfile::idleTime() const | 52 double ScriptProfile::idleTime() const |
| 53 { | 53 { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 { | 98 { |
| 99 RefPtr<TypeBuilder::Array<int> > array = TypeBuilder::Array<int>::create(); | 99 RefPtr<TypeBuilder::Array<int> > array = TypeBuilder::Array<int>::create(); |
| 100 int count = m_profile->GetSamplesCount(); | 100 int count = m_profile->GetSamplesCount(); |
| 101 for (int i = 0; i < count; i++) | 101 for (int i = 0; i < count; i++) |
| 102 array->addItem(m_profile->GetSample(i)->GetNodeId()); | 102 array->addItem(m_profile->GetSample(i)->GetNodeId()); |
| 103 return array.release(); | 103 return array.release(); |
| 104 } | 104 } |
| 105 | 105 |
| 106 | 106 |
| 107 } // namespace WebCore | 107 } // namespace WebCore |
| OLD | NEW |