diff options
| author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-05-24 08:28:08 +0000 |
|---|---|---|
| committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-05-24 08:28:08 +0000 |
| commit | a4e969f4965059196ca948db781e52f7cfebf19e (patch) | |
| tree | 6ca352808c8fdc52006a0f33f6ae3c593b23867d /Source/JavaScriptCore/debugger/Breakpoint.h | |
| parent | 41386e9cb918eed93b3f13648cbef387e371e451 (diff) | |
| download | WebKitGtk-tarball-a4e969f4965059196ca948db781e52f7cfebf19e.tar.gz | |
webkitgtk-2.12.3webkitgtk-2.12.3
Diffstat (limited to 'Source/JavaScriptCore/debugger/Breakpoint.h')
| -rw-r--r-- | Source/JavaScriptCore/debugger/Breakpoint.h | 57 |
1 files changed, 43 insertions, 14 deletions
diff --git a/Source/JavaScriptCore/debugger/Breakpoint.h b/Source/JavaScriptCore/debugger/Breakpoint.h index 95b92881d..78d208a2b 100644 --- a/Source/JavaScriptCore/debugger/Breakpoint.h +++ b/Source/JavaScriptCore/debugger/Breakpoint.h @@ -27,38 +27,67 @@ #define Breakpoint_h #include "DebuggerPrimitives.h" +#include <wtf/DoublyLinkedList.h> +#include <wtf/RefCounted.h> #include <wtf/text/WTFString.h> namespace JSC { -struct Breakpoint { +struct Breakpoint : public DoublyLinkedListNode<Breakpoint> { Breakpoint() - : id(noBreakpointID) - , sourceID(noSourceID) - , line(0) - , column(0) - , autoContinue(false) { } - Breakpoint(SourceID sourceID, unsigned line, unsigned column, String condition, bool autoContinue) - : id(noBreakpointID) - , sourceID(sourceID) + Breakpoint(SourceID sourceID, unsigned line, unsigned column, const String& condition, bool autoContinue, unsigned ignoreCount) + : sourceID(sourceID) , line(line) , column(column) , condition(condition) , autoContinue(autoContinue) + , ignoreCount(ignoreCount) { } - BreakpointID id; - SourceID sourceID; - unsigned line; - unsigned column; + Breakpoint(const Breakpoint& other) + : id(other.id) + , sourceID(other.sourceID) + , line(other.line) + , column(other.column) + , condition(other.condition) + , autoContinue(other.autoContinue) + , ignoreCount(other.ignoreCount) + , hitCount(other.hitCount) + { + } + + BreakpointID id { noBreakpointID }; + SourceID sourceID { noSourceID }; + unsigned line { 0 }; + unsigned column { 0 }; String condition; - bool autoContinue; + bool autoContinue { false }; + unsigned ignoreCount { 0 }; + unsigned hitCount { 0 }; static const unsigned unspecifiedColumn = UINT_MAX; + +private: + Breakpoint* m_prev; + Breakpoint* m_next; + + friend class WTF::DoublyLinkedListNode<Breakpoint>; +}; + +class BreakpointsList : public DoublyLinkedList<Breakpoint>, + public RefCounted<BreakpointsList> { +public: + ~BreakpointsList() + { + Breakpoint* breakpoint; + while ((breakpoint = removeHead())) + delete breakpoint; + ASSERT(isEmpty()); + } }; } // namespace JSC |
