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

Side by Side Diff: Source/core/inspector/ScriptProfile.cpp

Issue 15816002: Remove console.profiles from window.console API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years, 7 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
« no previous file with comments | « Source/core/inspector/ScriptProfile.h ('k') | Source/core/inspector/ScriptProfile.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/inspector/ScriptProfile.h ('k') | Source/core/inspector/ScriptProfile.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698