[webkit-reviews] review granted: [Bug 94636] WTF Threading leaks kernel objects on platforms that use pthreads : [Attachment 159772] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 21 15:19:21 PDT 2012


Geoffrey Garen <ggaren at apple.com> has granted Mark Hahnenberg
<mhahnenberg at apple.com>'s request for review:
Bug 94636: WTF Threading leaks kernel objects on platforms that use pthreads
https://bugs.webkit.org/show_bug.cgi?id=94636

Attachment 159772: Patch
https://bugs.webkit.org/attachment.cgi?id=159772&action=review

------- Additional Comments from Geoffrey Garen <ggaren at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=159772&action=review


r=me with some style comments.

> Source/WTF/wtf/ThreadingPthreads.cpp:169
> +static pthread_t unsafePthreadHandleForIdentifier(ThreadIdentifier id)

How about calling this "pthreadHandleForIdentifierWithLockAlreadyHeld".

> Source/WTF/wtf/ThreadingPthreads.cpp:219
> +void threadWasJoined(ThreadIdentifier threadID)

Let's just move this code into waitForThreadCompletion.

> Source/WTF/wtf/ThreadingPthreads.cpp:258
> +void unsafeThreadWasDetached(ThreadIdentifier threadID)

Let's inline this, since I don't like the "unsafe" prefix and inlining will
solve that and avoid anyone calling this without the lock.

> Source/WTF/wtf/ThreadingPthreads.cpp:264
> +	   delete state;

Let's use OwnPtr in the map instead.


More information about the webkit-reviews mailing list