| 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/AsyncCallChain.h" | |
| 6 | |
| 7 #include "wtf/text/WTFString.h" | |
| 8 | |
| 9 namespace blink { | |
| 10 | |
| 11 AsyncCallStack::AsyncCallStack(const String& description, v8::Local<v8::Object>
callFrames) | |
| 12 : m_description(description) | |
| 13 , m_callFrames(callFrames->GetIsolate(), callFrames) | |
| 14 { | |
| 15 } | |
| 16 | |
| 17 AsyncCallStack::~AsyncCallStack() | |
| 18 { | |
| 19 } | |
| 20 | |
| 21 PassRefPtr<AsyncCallChain> AsyncCallChain::create(v8::Local<v8::Context> creatio
nContext, PassRefPtr<AsyncCallStack> stack, AsyncCallChain* prevChain, unsigned
asyncCallChainMaxLength) | |
| 22 { | |
| 23 return adoptRef(new AsyncCallChain(creationContext, stack, prevChain, asyncC
allChainMaxLength)); | |
| 24 } | |
| 25 | |
| 26 AsyncCallChain::AsyncCallChain(v8::Local<v8::Context> creationContext, PassRefPt
r<AsyncCallStack> stack, AsyncCallChain* prevChain, unsigned asyncCallChainMaxLe
ngth) | |
| 27 { | |
| 28 m_creationContext.Reset(creationContext->GetIsolate(), creationContext); | |
| 29 if (stack) | |
| 30 m_callStacks.append(stack); | |
| 31 if (prevChain) { | |
| 32 const AsyncCallStackVector& other = prevChain->m_callStacks; | |
| 33 for (size_t i = 0; i < other.size() && m_callStacks.size() < asyncCallCh
ainMaxLength; i++) | |
| 34 m_callStacks.append(other[i]); | |
| 35 } | |
| 36 } | |
| 37 | |
| 38 AsyncCallChain::~AsyncCallChain() | |
| 39 { | |
| 40 } | |
| 41 | |
| 42 } // namespace blink | |
| OLD | NEW |