[webkit-reviews] review requested: [Bug 128450] Remove unnecessary spinLock in JSLock. : [Attachment 223725] patch for landing.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 10 10:34:45 PST 2014


Mark Lam <mark.lam at apple.com> has asked  for review:
Bug 128450: Remove unnecessary spinLock in JSLock.
https://bugs.webkit.org/show_bug.cgi?id=128450

Attachment 223725: patch for landing.
https://bugs.webkit.org/attachment.cgi?id=223725&action=review

------- Additional Comments from Mark Lam <mark.lam at apple.com>
Thanks for Geoff’s and Filip’s feedback.  In this updated patch, I did the
following:
1. removed the memory fences
2. changed setOwnerThread() into an inline function since it is now a trivial
single assignment.
3. removed the unnecessary scoping in JSLock::lock() now that reviewers have
had a chance to see the diffs before its removal.
4. removed the ChangeLog comments about the necessity for a memory
barrier/fence.
5. added a paragraph to explain how weak memory ordering can cause Thread B to
not see Thread A’s id in m_ownerThread when doing an ownership test, but that
is immaterial because Thread B will see a 0 (written out courtesy of the memory
fence in the last mutex unlock) and know that it does not own the lock.


More information about the webkit-reviews mailing list