OLD | NEW |
| (Empty) |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "core/inspector/ScriptAsyncCallStack.h" | |
6 | |
7 namespace blink { | |
8 | |
9 PassRefPtr<ScriptAsyncCallStack> ScriptAsyncCallStack::create(const String& desc
ription, PassRefPtr<ScriptCallStack> callStack, PassRefPtr<ScriptAsyncCallStack>
asyncStackTrace) | |
10 { | |
11 return adoptRef(new ScriptAsyncCallStack(description, callStack, asyncStackT
race)); | |
12 } | |
13 | |
14 ScriptAsyncCallStack::ScriptAsyncCallStack(const String& description, PassRefPtr
<ScriptCallStack> callStack, PassRefPtr<ScriptAsyncCallStack> asyncStackTrace) | |
15 : m_description(description) | |
16 , m_callStack(callStack) | |
17 , m_asyncStackTrace(asyncStackTrace) | |
18 { | |
19 ASSERT(m_callStack); | |
20 } | |
21 | |
22 ScriptAsyncCallStack::~ScriptAsyncCallStack() | |
23 { | |
24 } | |
25 | |
26 PassRefPtr<TypeBuilder::Console::AsyncStackTrace> ScriptAsyncCallStack::buildIns
pectorObject() const | |
27 { | |
28 RefPtr<TypeBuilder::Console::AsyncStackTrace> result = TypeBuilder::Console:
:AsyncStackTrace::create() | |
29 .setCallFrames(m_callStack->buildInspectorArray()) | |
30 .release(); | |
31 result->setDescription(m_description); | |
32 if (m_asyncStackTrace) | |
33 result->setAsyncStackTrace(m_asyncStackTrace->buildInspectorObject()); | |
34 return result.release(); | |
35 } | |
36 | |
37 } // namespace blink | |
OLD | NEW |