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 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(ScriptCallStack); |
| 38 |
| 39 PassRefPtrWillBeRawPtr<ScriptCallStack> ScriptCallStack::create(Vector<ScriptCal
lFrame>& frames) |
38 { | 40 { |
39 return adoptRef(new ScriptCallStack(frames)); | 41 return adoptRefWillBeNoop(new ScriptCallStack(frames)); |
40 } | 42 } |
41 | 43 |
42 ScriptCallStack::ScriptCallStack(Vector<ScriptCallFrame>& frames) | 44 ScriptCallStack::ScriptCallStack(Vector<ScriptCallFrame>& frames) |
43 { | 45 { |
44 m_frames.swap(frames); | 46 m_frames.swap(frames); |
45 } | 47 } |
46 | 48 |
47 ScriptCallStack::~ScriptCallStack() | |
48 { | |
49 } | |
50 | |
51 const ScriptCallFrame &ScriptCallStack::at(size_t index) const | 49 const ScriptCallFrame &ScriptCallStack::at(size_t index) const |
52 { | 50 { |
53 ASSERT(m_frames.size() > index); | 51 ASSERT(m_frames.size() > index); |
54 return m_frames[index]; | 52 return m_frames[index]; |
55 } | 53 } |
56 | 54 |
57 size_t ScriptCallStack::size() const | 55 size_t ScriptCallStack::size() const |
58 { | 56 { |
59 return m_frames.size(); | 57 return m_frames.size(); |
60 } | 58 } |
61 | 59 |
62 PassRefPtr<TypeBuilder::Array<TypeBuilder::Console::CallFrame> > ScriptCallStack
::buildInspectorArray() const | 60 PassRefPtr<TypeBuilder::Array<TypeBuilder::Console::CallFrame> > ScriptCallStack
::buildInspectorArray() const |
63 { | 61 { |
64 RefPtr<TypeBuilder::Array<TypeBuilder::Console::CallFrame> > frames = TypeBu
ilder::Array<TypeBuilder::Console::CallFrame>::create(); | 62 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++) | 63 for (size_t i = 0; i < m_frames.size(); i++) |
66 frames->addItem(m_frames.at(i).buildInspectorObject()); | 64 frames->addItem(m_frames.at(i).buildInspectorObject()); |
67 return frames; | 65 return frames; |
68 } | 66 } |
69 | 67 |
70 } // namespace WebCore | 68 } // namespace WebCore |
OLD | NEW |