[webkit-reviews] review denied: [Bug 37584] LEAK: in ThreadableWebSocketChannel::create() : [Attachment 53343] Patch v1
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Apr 14 11:15:00 PDT 2010
David Levin <levin at chromium.org> has denied Shinichiro Hamaji
<hamaji at chromium.org>'s request for review:
Bug 37584: LEAK: in ThreadableWebSocketChannel::create()
https://bugs.webkit.org/show_bug.cgi?id=37584
Attachment 53343: Patch v1
https://bugs.webkit.org/attachment.cgi?id=53343&action=review
------- Additional Comments from David Levin <levin at chromium.org>
> diff --git a/WebCore/websockets/WorkerThreadableWebSocketChannel.cpp
b/WebCore/websockets/WorkerThreadableWebSocketChannel.cpp
> index 3dda104..d99efaa 100644
> --- a/WebCore/websockets/WorkerThreadableWebSocketChannel.cpp
> +++ b/WebCore/websockets/WorkerThreadableWebSocketChannel.cpp
> @@ -52,7 +52,7 @@ namespace WebCore {
>
WorkerThreadableWebSocketChannel::WorkerThreadableWebSocketChannel(WorkerContex
t* 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(adoptRef(new Bridge(m_workerClientWrapper, m_workerContext,
taskMode, url, protocol)))
The standard way to do this is to make the constructor private and make a
static create method which does the adoptRef and returns a PassRefPtr.
More information about the webkit-reviews
mailing list