[webkit-reviews] review granted: [Bug 132032] DFG::Worklist should acquire the m_lock before iterating DFG plans : [Attachment 229928] the patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 22 17:30:20 PDT 2014


Filip Pizlo <fpizlo at apple.com> has granted Mark Lam <mark.lam at apple.com>'s
request for review:
Bug 132032: DFG::Worklist should acquire the m_lock before iterating DFG plans
https://bugs.webkit.org/show_bug.cgi?id=132032

Attachment 229928: the patch
https://bugs.webkit.org/attachment.cgi?id=229928&action=review

------- Additional Comments from Filip Pizlo <fpizlo at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=229928&action=review


R=me.

> Source/JavaScriptCore/dfg/DFGWorklist.cpp:237
>      for (unsigned i = m_threads.size(); i--;) {

Can you do us a favor and add a comment on top of this loop that says that it
doesn't need further locking because (1) no new threads can be added to
m_threads so that data structure is immutable and needs no locks, and (2)
ThreadDatea::m_safepoint is protected by that thread's rightToRun which we must
be holding here because of a prior call to suspendAllThreads().  Or something
to that effect.


More information about the webkit-reviews mailing list