Summary: | LEAK: in ThreadableWebSocketChannel::create() | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Shinichiro Hamaji <hamaji> | ||||||
Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | ukai | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Attachments: |
|
Description
Shinichiro Hamaji
2010-04-14 10:14:55 PDT
Created attachment 53343 [details]
Patch v1
(In reply to comment #1) > Created an attachment (id=53343) [details] > Patch v1 LGTM. Thanks! Comment on attachment 53343 [details] Patch v1 > 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(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(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. Created attachment 53348 [details]
Patch v2
(In reply to comment #4) > Created an attachment (id=53348) [details] > Patch v2 Looks good! I believe no other class in websockets does the same mistake. Comment on attachment 53348 [details]
Patch v2
Your Changelog doesn't reflect your change now. (It seems to be missing the recent changes.) so please do a minor update on that and submit this.
Thanks!
Committed r57646: <http://trac.webkit.org/changeset/57646> Oops. I fixed the ChangeLog entry before I landed. Thanks for your review! |