Commit c6c9c741 authored by hamaji@chromium.org's avatar hamaji@chromium.org

2010-04-15 Shinichiro Hamaji <hamaji@chromium.org>

        Reviewed by David Levin.

        LEAK: in ThreadableWebSocketChannel::create()
        https://bugs.webkit.org/show_bug.cgi?id=37584

        No new tests because this change just fixes a leak.

        * websockets/WorkerThreadableWebSocketChannel.cpp:
        (WebCore::WorkerThreadableWebSocketChannel::WorkerThreadableWebSocketChannel):
        * websockets/WorkerThreadableWebSocketChannel.h:
        (WebCore::WorkerThreadableWebSocketChannel::Bridge::create):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@57646 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent c647272e
2010-04-15 Shinichiro Hamaji <hamaji@chromium.org>
Reviewed by David Levin.
LEAK: in ThreadableWebSocketChannel::create()
https://bugs.webkit.org/show_bug.cgi?id=37584
No new tests because this change just fixes a leak.
* websockets/WorkerThreadableWebSocketChannel.cpp:
(WebCore::WorkerThreadableWebSocketChannel::WorkerThreadableWebSocketChannel):
* websockets/WorkerThreadableWebSocketChannel.h:
(WebCore::WorkerThreadableWebSocketChannel::Bridge::create):
2010-04-15 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Reviewed by Eric Seidel.
......@@ -52,7 +52,7 @@ namespace WebCore {
WorkerThreadableWebSocketChannel::WorkerThreadableWebSocketChannel(WorkerContext* context, WebSocketChannelClient* client, const String& taskMode, const KURL& url, const String& protocol)
: m_workerContext(context)
, m_workerClientWrapper(ThreadableWebSocketChannelClientWrapper::create(client))
, m_bridge(new Bridge(m_workerClientWrapper, m_workerContext, taskMode, url, protocol))
, m_bridge(Bridge::create(m_workerClientWrapper, m_workerContext, taskMode, url, protocol))
{
}
......
......@@ -105,7 +105,10 @@ private:
// Bridge for Peer. Running on the worker thread.
class Bridge : public RefCounted<Bridge> {
public:
Bridge(PassRefPtr<ThreadableWebSocketChannelClientWrapper>, PassRefPtr<WorkerContext>, const String& taskMode, const KURL&, const String& protocol);
static PassRefPtr<Bridge> create(PassRefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper, PassRefPtr<WorkerContext> workerContext, const String& taskMode, const KURL& url, const String& protocol)
{
return adoptRef(new Bridge(workerClientWrapper, workerContext, taskMode, url, protocol));
}
~Bridge();
void connect();
bool send(const String& message);
......@@ -117,6 +120,8 @@ private:
using RefCounted<Bridge>::deref;
private:
Bridge(PassRefPtr<ThreadableWebSocketChannelClientWrapper>, PassRefPtr<WorkerContext>, const String& taskMode, const KURL&, const String& protocol);
static void setWebSocketChannel(ScriptExecutionContext*, Bridge* thisPtr, Peer*, RefPtr<ThreadableWebSocketChannelClientWrapper>);
// Executed on the main thread to create a Peer for this bridge.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment