Summary: | WTF Threading leaks kernel objects on platforms that use pthreads | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Mark Hahnenberg <mhahnenberg> | ||||
Component: | JavaScriptCore | Assignee: | Mark Hahnenberg <mhahnenberg> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | benjamin, ggaren, levin+threading, webkit.review.bot | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 94660 | ||||||
Attachments: |
|
Description
Mark Hahnenberg
2012-08-21 14:27:27 PDT
Created attachment 159772 [details]
Patch
Comment on attachment 159772 [details] Patch 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. Committed r126208: <http://trac.webkit.org/changeset/126208> |