- Small cleanup in the ServerConnection class.
* Drosera/win/ServerConnection.cpp: Added comments, moved some functions
and added an include.
(ServerConnection::currentFrame):
(ServerConnection::getCallerFrame):
* Drosera/win/ServerConnection.h: Added comments, moved some functions,
made a pointer into a COMPtr, and cleaned up the includes.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27267
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-10-30 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by NOBODY (OOPS!).
+
+ - Small cleanup in the ServerConnection class.
+
+ * Drosera/win/ServerConnection.cpp: Added comments, moved some functions
+ and added an include.
+ (ServerConnection::currentFrame):
+ (ServerConnection::getCallerFrame):
+ * Drosera/win/ServerConnection.h: Added comments, moved some functions,
+ made a pointer into a COMPtr, and cleaned up the includes.
+
2007-10-29 Timothy Hatcher <timothy@apple.com>
Reviewed by John Sullivan.
#include <JavaScriptCore/JSRetainPtr.h>
#include <JavaScriptCore/JSStringRefBSTR.h>
#include <JavaScriptCore/RetainPtr.h>
+#include <WebKit/IWebScriptCallFrame.h>
+#include <WebKit/IWebScriptDebugServer.h>
#include <WebKit/WebKit.h>
ServerConnection::ServerConnection()
m_globalContext = JSGlobalContextRetain(globalContextRef);
}
+// Pause & Step
+
void ServerConnection::pause()
{
if (m_server)
m_server->removeListener(this);
}
-// Stack & Variables
-
-IWebScriptCallFrame* ServerConnection::currentFrame() const
-{
- return m_currentFrame;
-}
-
-IWebScriptCallFrame* ServerConnection::getCallerFrame(int callFrame) const
-{
- COMPtr<IWebScriptCallFrame> cframe = currentFrame();
- COMPtr<IWebScriptCallFrame> callerFrame;
- for (int count = 0; count < callFrame; count++) {
- if (FAILED(cframe->caller(&callerFrame)))
- return 0;
-
- cframe = callerFrame;
- }
-
- return cframe.get();
-}
-
-
// IUnknown --------------------------------------------------
HRESULT STDMETHODCALLTYPE ServerConnection::QueryInterface(REFIID riid, void** ppvObject)
{
if (!m_globalContext)
return ret;
- // FIXME: This won't be relevant until IWebScriptCallFrame is implemented on Windows
m_currentFrame = frame;
JSValueRef sidJS = JSValueMakeNumber(m_globalContext, sourceID);
DebuggerDocument::willLeaveCallFrame(m_globalContext, sidJS, linenoJS);
- // FIXME: This won't be relevant until IWebScriptCallFrame is implemented on Windows
m_currentFrame = frame;
return S_OK;
return ret;
}
+
+// Stack & Variables
+
+IWebScriptCallFrame* ServerConnection::currentFrame() const
+{
+ return m_currentFrame.get();
+}
+
+IWebScriptCallFrame* ServerConnection::getCallerFrame(int callFrame) const
+{
+ COMPtr<IWebScriptCallFrame> cframe = currentFrame();
+ COMPtr<IWebScriptCallFrame> callerFrame;
+ for (int count = 0; count < callFrame; count++) {
+ if (FAILED(cframe->caller(&callerFrame)))
+ return 0;
+
+ cframe = callerFrame;
+ }
+
+ return cframe.get();
+}
#include <string>
#include <WebCore/COMPtr.h>
#include <WebKit/IWebScriptDebugListener.h>
-#include <WebKit/IWebScriptDebugServer.h>
class DebuggerClient;
interface IWebScriptCallFrame;
+interface IWebScriptDebugServer;
typedef struct OpaqueJSContext* JSGlobalContextRef;
~ServerConnection();
void setGlobalContext(JSGlobalContextRef);
+
+ // Pause & Step
void pause();
void resume();
void stepInto();
+ // Connection Handling
void applicationTerminating();
void serverConnectionDidDie();
- IWebScriptCallFrame* currentFrame() const;
- IWebScriptCallFrame* getCallerFrame(int callFrame) const;
// IUnknown
HRESULT STDMETHODCALLTYPE QueryInterface(
/* [in] */ int lineNumber,
/* [in] */ IWebFrame*);
+ // Stack & Variables
+ IWebScriptCallFrame* currentFrame() const;
+ IWebScriptCallFrame* getCallerFrame(int callFrame) const;
+
private:
std::wstring m_currentServerName;
- // FIXME: make this a COMPtr when the Interface exists and the destructor can be called.
- IWebScriptCallFrame* m_currentFrame;
+ COMPtr<IWebScriptCallFrame> m_currentFrame;
COMPtr<IWebScriptDebugServer> m_server;
JSGlobalContextRef m_globalContext;
};