RESOLVED FIXED 67866
HRTFDatabaseLoader should not call WTF::waitForThreadCompletion() more than once
https://bugs.webkit.org/show_bug.cgi?id=67866
Summary HRTFDatabaseLoader should not call WTF::waitForThreadCompletion() more than once
Chris Rogers
Reported 2011-09-09 14:46:44 PDT
HRTFDatabaseLoader should not call WTF::waitForThreadCompletion() more than once
Attachments
Patch (3.80 KB, patch)
2011-09-09 14:50 PDT, Chris Rogers
no flags
Patch (4.36 KB, patch)
2011-09-09 16:26 PDT, Chris Rogers
no flags
Chris Rogers
Comment 1 2011-09-09 14:50:14 PDT
David Levin
Comment 2 2011-09-09 15:21:33 PDT
Comment on attachment 106926 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=106926&action=review > Source/WebCore/platform/audio/HRTFDatabaseLoader.cpp:127 > + // WTF::waitForThreadCompletion() should not be called twice for the same thread. It feels odd to have the WTF:: prefix here but not in the code. It takes me a little more time to pair the two. (I'd just leave it off in the comment.) > Source/WebCore/platform/audio/HRTFDatabaseLoader.h:84 > + Mutex m_threadLock; Ideally there would be some comment like what is here: http://trac.webkit.org/browser/trunk/Source/WebCore/loader/icon/IconDatabase.h#L160 I think it is only guarding m_databaseLoaderThread but in one instance in the code, it is also guarding "m_startedLoadingDatabase = true;" which I don't think is needed (and is confusing because that variable isn't guarded when used elsewhere. Why do we even have m_startedLoadingDatabase when it seems like the value of m_databaseLoaderThread serves the same purpose?
Chris Rogers
Comment 3 2011-09-09 16:26:43 PDT
Chris Rogers
Comment 4 2011-09-09 16:27:57 PDT
(In reply to comment #2) > (From update of attachment 106926 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=106926&action=review > > > Source/WebCore/platform/audio/HRTFDatabaseLoader.cpp:127 > > + // WTF::waitForThreadCompletion() should not be called twice for the same thread. > > It feels odd to have the WTF:: prefix here but not in the code. It takes me a little more time to pair the two. (I'd just leave it off in the comment.) FIXED > > > Source/WebCore/platform/audio/HRTFDatabaseLoader.h:84 > > + Mutex m_threadLock; > > Ideally there would be some comment like what is here: http://trac.webkit.org/browser/trunk/Source/WebCore/loader/icon/IconDatabase.h#L160 FIXED: added similar comment > > I think it is only guarding m_databaseLoaderThread but in one instance in the code, it is also guarding "m_startedLoadingDatabase = true;" which I don't think is needed (and is confusing because that variable isn't guarded when used elsewhere. > > Why do we even have m_startedLoadingDatabase when it seems like the value of m_databaseLoaderThread serves the same purpose? Good point - removed m_startedLoadingDatabase
David Levin
Comment 5 2011-09-09 16:29:44 PDT
Comment on attachment 106936 [details] Patch Thanks!
Chris Rogers
Comment 6 2011-09-09 16:32:08 PDT
Dave, thanks for the review. I really appreciate you bearing through this problem with me. Now hopefully my win-debug layout tests will greenify!
WebKit Review Bot
Comment 7 2011-09-09 17:58:50 PDT
Comment on attachment 106936 [details] Patch Clearing flags on attachment: 106936 Committed r94893: <http://trac.webkit.org/changeset/94893>
WebKit Review Bot
Comment 8 2011-09-09 17:58:54 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.