diff options
Diffstat (limited to 'WebCore/inspector/JavaScriptDebugServer.h')
-rw-r--r-- | WebCore/inspector/JavaScriptDebugServer.h | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/WebCore/inspector/JavaScriptDebugServer.h b/WebCore/inspector/JavaScriptDebugServer.h index baa6699..33c6e3d 100644 --- a/WebCore/inspector/JavaScriptDebugServer.h +++ b/WebCore/inspector/JavaScriptDebugServer.h @@ -33,6 +33,7 @@ #include "Timer.h" #include <debugger/Debugger.h> +#include <runtime/UString.h> #include <wtf/HashMap.h> #include <wtf/HashSet.h> #include <wtf/RefPtr.h> @@ -61,7 +62,8 @@ namespace WebCore { void addListener(JavaScriptDebugListener*, Page*); void removeListener(JavaScriptDebugListener*, Page*); - void addBreakpoint(intptr_t sourceID, unsigned lineNumber); + void addBreakpoint(intptr_t sourceID, unsigned lineNumber, const JSC::UString& condition); + void updateBreakpoint(intptr_t sourceID, unsigned lineNumber, const JSC::UString& condition); void removeBreakpoint(intptr_t sourceID, unsigned lineNumber); bool hasBreakpoint(intptr_t sourceID, unsigned lineNumber) const; void clearBreakpoints(); @@ -86,6 +88,15 @@ namespace WebCore { typedef void (JavaScriptDebugListener::*JavaScriptExecutionCallback)(); private: + class BreakpointInfo { + public: + BreakpointInfo(const JSC::UString& condition) : m_condition(condition) {} + const JSC::UString& condition() const; + void setCondition(const JSC::UString& condition); + private: + JSC::UString m_condition; + }; + JavaScriptDebugServer(); ~JavaScriptDebugServer(); @@ -100,7 +111,9 @@ namespace WebCore { void dispatchFunctionToListeners(JavaScriptExecutionCallback, Page*); void pauseIfNeeded(Page*); - + BreakpointInfo* breakpointInfo(intptr_t sourceID, unsigned lineNumber) const; + void updateBreakpointInfo(BreakpointInfo* info, const JSC::UString& condition); + virtual void detach(JSC::JSGlobalObject*); virtual void sourceParsed(JSC::ExecState*, const JSC::SourceCode&, int errorLine, const JSC::UString& errorMsg); @@ -111,12 +124,15 @@ namespace WebCore { virtual void willExecuteProgram(const JSC::DebuggerCallFrame&, intptr_t sourceID, int lineno); virtual void didExecuteProgram(const JSC::DebuggerCallFrame&, intptr_t sourceID, int lineno); virtual void didReachBreakpoint(const JSC::DebuggerCallFrame&, intptr_t sourceID, int lineno); - + void didAddListener(Page*); void didRemoveListener(Page*); void didRemoveLastListener(); typedef HashMap<Page*, ListenerSet*> PageListenersMap; + typedef HashMap<unsigned, BreakpointInfo*> LineToBreakpointInfoMap; + typedef HashMap<intptr_t, LineToBreakpointInfoMap*> BreakpointsMap; + PageListenersMap m_pageListenersMap; ListenerSet m_listeners; bool m_callingListeners; @@ -126,7 +142,7 @@ namespace WebCore { bool m_doneProcessingDebuggerEvents; JavaScriptCallFrame* m_pauseOnCallFrame; RefPtr<JavaScriptCallFrame> m_currentCallFrame; - HashMap<intptr_t, HashSet<unsigned>*> m_breakpoints; + BreakpointsMap m_breakpoints; Timer<JavaScriptDebugServer> m_recompileTimer; }; |