| 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 25 matching lines...) Expand all Loading... |
| 36 #include "platform/v8_inspector/public/V8StackTrace.h" | 36 #include "platform/v8_inspector/public/V8StackTrace.h" |
| 37 #include "wtf/Forward.h" | 37 #include "wtf/Forward.h" |
| 38 #include "wtf/RefCounted.h" | 38 #include "wtf/RefCounted.h" |
| 39 | 39 |
| 40 namespace blink { | 40 namespace blink { |
| 41 | 41 |
| 42 class TracedValue; | 42 class TracedValue; |
| 43 | 43 |
| 44 class CORE_EXPORT ScriptCallStack final : public RefCounted<ScriptCallStack> { | 44 class CORE_EXPORT ScriptCallStack final : public RefCounted<ScriptCallStack> { |
| 45 public: | 45 public: |
| 46 static PassRefPtr<ScriptCallStack> create(v8::Isolate*, v8::Local<v8::StackT
race>, size_t maxStackSize = V8StackTrace::maxCallStackSizeToCapture); | |
| 47 static PassRefPtr<ScriptCallStack> capture(size_t maxStackSize = V8StackTrac
e::maxCallStackSizeToCapture); | 46 static PassRefPtr<ScriptCallStack> capture(size_t maxStackSize = V8StackTrac
e::maxCallStackSizeToCapture); |
| 48 static PassRefPtr<ScriptCallStack> captureForConsole(); | 47 static PassRefPtr<ScriptCallStack> captureForConsole(); |
| 49 | 48 |
| 50 ~ScriptCallStack(); | 49 ~ScriptCallStack(); |
| 51 | 50 |
| 52 bool isEmpty() const; | 51 bool isEmpty() const; |
| 53 String topSourceURL() const; | 52 String topSourceURL() const; |
| 54 unsigned topLineNumber() const; | 53 unsigned topLineNumber() const; |
| 55 unsigned topColumnNumber() const; | 54 unsigned topColumnNumber() const; |
| 56 | 55 |
| 57 std::unique_ptr<protocol::Runtime::StackTrace> buildInspectorObject() const; | 56 std::unique_ptr<protocol::Runtime::StackTrace> buildInspectorObject() const; |
| 58 void toTracedValue(TracedValue*, const char* name) const; | 57 void toTracedValue(TracedValue*, const char* name) const; |
| 59 String toString() const; | 58 String toString() const; |
| 60 std::unique_ptr<V8StackTrace> copyStackTrace() const; | 59 std::unique_ptr<V8StackTrace> copyStackTrace() const; |
| 61 | 60 |
| 62 private: | 61 private: |
| 63 explicit ScriptCallStack(std::unique_ptr<V8StackTrace>); | 62 explicit ScriptCallStack(std::unique_ptr<V8StackTrace>); |
| 64 std::unique_ptr<V8StackTrace> m_stackTrace; | 63 std::unique_ptr<V8StackTrace> m_stackTrace; |
| 65 }; | 64 }; |
| 66 | 65 |
| 67 } // namespace blink | 66 } // namespace blink |
| 68 | 67 |
| 69 #endif // ScriptCallStack_h | 68 #endif // ScriptCallStack_h |
| OLD | NEW |