RESOLVED FIXED 65785
ThreadRestrictionVerifier needs a mode where an object is tied to a particular dispatch queue
https://bugs.webkit.org/show_bug.cgi?id=65785
Summary ThreadRestrictionVerifier needs a mode where an object is tied to a particula...
Mark Rowe (bdash)
Reported 2011-08-05 12:58:40 PDT
It’s not an uncommon practice to serialize access to an object by routing all access through a serial dispatch queue. We have some code built on top of WTF::RefCounted that uses this model and currently fails the ThreadRestrictionVerifier asserts all over the place since it doesn’t know about this model.
Attachments
Patch (5.83 KB, patch)
2011-08-05 14:21 PDT, Mark Rowe (bdash)
andersca: review+
Mark Rowe (bdash)
Comment 1 2011-08-05 13:00:34 PDT
I’ve typed up a patch and am waiting on a build to confirm that it makes the asserts go away. It should be ready for review in an hour or so.
Mark Rowe (bdash)
Comment 2 2011-08-05 14:21:20 PDT
Adam Roben (:aroben)
Comment 3 2011-08-05 14:29:23 PDT
Comment on attachment 103112 [details] Patch I wonder if we could add a test to TestWebKitAPI for this?
Anders Carlsson
Comment 4 2011-08-05 15:24:44 PDT
Comment on attachment 103112 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=103112&action=review > Source/JavaScriptCore/wtf/ThreadRestrictionVerifier.h:57 > + , m_owningQueue(0) This should be inside an #if HAVE(DISPATCH_H)
Mark Rowe (bdash)
Comment 5 2011-08-05 15:25:36 PDT
(In reply to comment #3) > (From update of attachment 103112 [details]) > I wonder if we could add a test to TestWebKitAPI for this? I have no idea. The original patch also didn’t have tests.
Mark Rowe (bdash)
Comment 6 2011-08-05 15:37:22 PDT
Landed in r92523.
David Levin
Comment 7 2011-08-07 06:44:38 PDT
Thanks for the fix (and for getting someone to review it quickly). I'm out and without much internet access right now. I'll add a bug to add tests for the original patch and this one.
Note You need to log in before you can comment on or make changes to this bug.