summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/bindings/v8/ScriptDebugServer.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/bindings/v8/ScriptDebugServer.h')
-rw-r--r--Source/WebCore/bindings/v8/ScriptDebugServer.h37
1 files changed, 8 insertions, 29 deletions
diff --git a/Source/WebCore/bindings/v8/ScriptDebugServer.h b/Source/WebCore/bindings/v8/ScriptDebugServer.h
index af3d2ab..15004ea 100644
--- a/Source/WebCore/bindings/v8/ScriptDebugServer.h
+++ b/Source/WebCore/bindings/v8/ScriptDebugServer.h
@@ -45,17 +45,11 @@
namespace WebCore {
-class Page;
class ScriptDebugListener;
class ScriptDebugServer {
WTF_MAKE_NONCOPYABLE(ScriptDebugServer);
public:
- static ScriptDebugServer& shared();
-
- void addListener(ScriptDebugListener*, Page*);
- void removeListener(ScriptDebugListener*, Page*);
-
String setBreakpoint(const String& sourceID, const ScriptBreakpoint&, int* actualLineNumber, int* actualColumnNumber);
void removeBreakpoint(const String& breakpointId);
void clearBreakpoints();
@@ -83,23 +77,8 @@ public:
void recompileAllJSFunctionsSoon() { }
void recompileAllJSFunctions(Timer<ScriptDebugServer>* = 0) { }
- void pageCreated(Page*) { }
-
- // v8-specific methods.
- void setDebuggerScriptSource(const String& scriptSource);
-
- class ClientMessageLoop {
- public:
- virtual ~ClientMessageLoop() { }
- virtual void run(Page*) = 0;
- virtual void quitNow() = 0;
- };
- void setClientMessageLoop(PassOwnPtr<ClientMessageLoop> clientMessageLoop) { m_clientMessageLoop = clientMessageLoop; }
-
PassRefPtr<JavaScriptCallFrame> currentCallFrame();
- void setEnabled(bool);
-
class Task {
public:
virtual ~Task() { }
@@ -108,9 +87,13 @@ public:
static void interruptAndRun(PassOwnPtr<Task>);
void runPendingTasks();
-private:
+protected:
ScriptDebugServer();
~ScriptDebugServer() { }
+
+ virtual ScriptDebugListener* getDebugListenerForContext(v8::Handle<v8::Context>) = 0;
+ virtual void runMessageLoopOnPause(v8::Handle<v8::Context>) = 0;
+ virtual void quitMessageLoopOnPause() = 0;
static v8::Handle<v8::Value> breakProgramCallback(const v8::Arguments& args);
void breakProgram(v8::Handle<v8::Object> executionState);
@@ -121,21 +104,17 @@ private:
void dispatchDidParseSource(ScriptDebugListener* listener, v8::Handle<v8::Object> sourceObject);
void ensureDebuggerScriptCompiled();
- void didResume();
+
+ bool isPaused();
- typedef HashMap<Page*, ScriptDebugListener*> ListenersMap;
- ListenersMap m_listenersMap;
- String m_debuggerScriptSource;
PauseOnExceptionsState m_pauseOnExceptionsState;
OwnHandle<v8::Object> m_debuggerScript;
RefPtr<JavaScriptCallFrame> m_currentCallFrame;
OwnHandle<v8::Object> m_executionState;
- OwnPtr<ClientMessageLoop> m_clientMessageLoop;
- Page* m_pausedPage;
v8::Local<v8::Context> m_pausedPageContext;
- bool m_enabled;
bool m_breakpointsActivated;
+ OwnHandle<v8::FunctionTemplate> m_breakProgramCallbackTemplate;
};
} // namespace WebCore