| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2008, 2010 Google Inc. All rights reserved. | 2 * Copyright (c) 2008, 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 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 #include "core/CoreExport.h" | 34 #include "core/CoreExport.h" |
| 35 #include "core/InspectorTypeBuilder.h" | 35 #include "core/InspectorTypeBuilder.h" |
| 36 #include "core/inspector/ScriptCallFrame.h" | 36 #include "core/inspector/ScriptCallFrame.h" |
| 37 #include "wtf/Forward.h" | 37 #include "wtf/Forward.h" |
| 38 #include "wtf/RefCounted.h" | 38 #include "wtf/RefCounted.h" |
| 39 #include "wtf/Vector.h" | 39 #include "wtf/Vector.h" |
| 40 | 40 |
| 41 namespace blink { | 41 namespace blink { |
| 42 | 42 |
| 43 class ScriptAsyncCallStack; | |
| 44 class TracedValue; | 43 class TracedValue; |
| 45 | 44 |
| 46 class CORE_EXPORT ScriptCallStack final : public RefCounted<ScriptCallStack> { | 45 class CORE_EXPORT ScriptCallStack final : public RefCounted<ScriptCallStack> { |
| 47 public: | 46 public: |
| 48 static const size_t maxCallStackSizeToCapture = 200; | 47 static const size_t maxCallStackSizeToCapture = 200; |
| 49 | 48 |
| 50 static PassRefPtr<ScriptCallStack> create(Vector<ScriptCallFrame>&); | 49 static PassRefPtr<ScriptCallStack> create(Vector<ScriptCallFrame>&); |
| 50 static PassRefPtr<ScriptCallStack> create(const String& description, Vector<
ScriptCallFrame>&, PassRefPtr<ScriptCallStack>); |
| 51 | 51 |
| 52 ~ScriptCallStack(); | 52 ~ScriptCallStack(); |
| 53 | 53 |
| 54 const ScriptCallFrame &at(size_t) const; | 54 const ScriptCallFrame &at(size_t) const; |
| 55 size_t size() const; | 55 size_t size() const; |
| 56 | 56 |
| 57 PassRefPtr<ScriptAsyncCallStack> asyncCallStack() const; | 57 void setParent(PassRefPtr<ScriptCallStack>); |
| 58 void setAsyncCallStack(PassRefPtr<ScriptAsyncCallStack>); | |
| 59 | 58 |
| 60 PassRefPtr<TypeBuilder::Array<TypeBuilder::Console::CallFrame> > buildInspec
torArray() const; | 59 PassRefPtr<TypeBuilder::Runtime::StackTrace> buildInspectorObject() const; |
| 61 void toTracedValue(TracedValue*, const char* name) const; | 60 void toTracedValue(TracedValue*, const char* name) const; |
| 62 | 61 |
| 63 private: | 62 private: |
| 64 explicit ScriptCallStack(Vector<ScriptCallFrame>&); | 63 ScriptCallStack(const String& description, Vector<ScriptCallFrame>& frames,
PassRefPtr<ScriptCallStack> parent); |
| 65 | 64 |
| 65 String m_description; |
| 66 Vector<ScriptCallFrame> m_frames; | 66 Vector<ScriptCallFrame> m_frames; |
| 67 RefPtr<ScriptAsyncCallStack> m_asyncCallStack; | 67 RefPtr<ScriptCallStack> m_parent; |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 } // namespace blink | 70 } // namespace blink |
| 71 | 71 |
| 72 #endif // ScriptCallStack_h | 72 #endif // ScriptCallStack_h |
| OLD | NEW |