diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/JavaScriptCore/debugger/Breakpoint.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/JavaScriptCore/debugger/Breakpoint.h')
-rw-r--r-- | Source/JavaScriptCore/debugger/Breakpoint.h | 66 |
1 files changed, 47 insertions, 19 deletions
diff --git a/Source/JavaScriptCore/debugger/Breakpoint.h b/Source/JavaScriptCore/debugger/Breakpoint.h index 95b92881d..c1504a150 100644 --- a/Source/JavaScriptCore/debugger/Breakpoint.h +++ b/Source/JavaScriptCore/debugger/Breakpoint.h @@ -20,47 +20,75 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef Breakpoint_h -#define Breakpoint_h +#pragma once #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) + , resolved(other.resolved) + { + } + + 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 }; + bool resolved { false }; static const unsigned unspecifiedColumn = UINT_MAX; + +private: + Breakpoint* m_prev; + Breakpoint* m_next; + + friend class WTF::DoublyLinkedListNode<Breakpoint>; }; -} // namespace JSC +class BreakpointsList : public DoublyLinkedList<Breakpoint>, + public RefCounted<BreakpointsList> { +public: + ~BreakpointsList() + { + Breakpoint* breakpoint; + while ((breakpoint = removeHead())) + delete breakpoint; + ASSERT(isEmpty()); + } +}; -#endif // Breakpoint_h +} // namespace JSC |