OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2008, Google Inc. All rights reserved. | 2 * Copyright (c) 2008, 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 16 matching lines...) Expand all Loading... |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #include "config.h" | 31 #include "config.h" |
32 #include "core/inspector/ScriptCallStack.h" | 32 #include "core/inspector/ScriptCallStack.h" |
33 | 33 |
34 | 34 |
35 namespace WebCore { | 35 namespace WebCore { |
36 | 36 |
37 PassRefPtr<ScriptCallStack> ScriptCallStack::create(Vector<ScriptCallFrame>& fra
mes) | 37 PassRefPtrWillBeRawPtr<ScriptCallStack> ScriptCallStack::create(Vector<ScriptCal
lFrame>& frames) |
38 { | 38 { |
39 return adoptRef(new ScriptCallStack(frames)); | 39 return adoptRefWillBeNoop(new ScriptCallStack(frames)); |
40 } | 40 } |
41 | 41 |
42 ScriptCallStack::ScriptCallStack(Vector<ScriptCallFrame>& frames) | 42 ScriptCallStack::ScriptCallStack(Vector<ScriptCallFrame>& frames) |
43 { | 43 { |
44 m_frames.swap(frames); | 44 m_frames.swap(frames); |
45 } | 45 } |
46 | 46 |
47 ScriptCallStack::~ScriptCallStack() | |
48 { | |
49 } | |
50 | |
51 const ScriptCallFrame &ScriptCallStack::at(size_t index) const | 47 const ScriptCallFrame &ScriptCallStack::at(size_t index) const |
52 { | 48 { |
53 ASSERT(m_frames.size() > index); | 49 ASSERT(m_frames.size() > index); |
54 return m_frames[index]; | 50 return m_frames[index]; |
55 } | 51 } |
56 | 52 |
57 size_t ScriptCallStack::size() const | 53 size_t ScriptCallStack::size() const |
58 { | 54 { |
59 return m_frames.size(); | 55 return m_frames.size(); |
60 } | 56 } |
61 | 57 |
62 PassRefPtr<TypeBuilder::Array<TypeBuilder::Console::CallFrame> > ScriptCallStack
::buildInspectorArray() const | 58 PassRefPtr<TypeBuilder::Array<TypeBuilder::Console::CallFrame> > ScriptCallStack
::buildInspectorArray() const |
63 { | 59 { |
64 RefPtr<TypeBuilder::Array<TypeBuilder::Console::CallFrame> > frames = TypeBu
ilder::Array<TypeBuilder::Console::CallFrame>::create(); | 60 RefPtr<TypeBuilder::Array<TypeBuilder::Console::CallFrame> > frames = TypeBu
ilder::Array<TypeBuilder::Console::CallFrame>::create(); |
65 for (size_t i = 0; i < m_frames.size(); i++) | 61 for (size_t i = 0; i < m_frames.size(); i++) |
66 frames->addItem(m_frames.at(i).buildInspectorObject()); | 62 frames->addItem(m_frames.at(i).buildInspectorObject()); |
67 return frames; | 63 return frames; |
68 } | 64 } |
69 | 65 |
70 } // namespace WebCore | 66 } // namespace WebCore |
OLD | NEW |