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.
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.
Created attachment 103112 [details] Patch
Comment on attachment 103112 [details] Patch I wonder if we could add a test to TestWebKitAPI for this?
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)
(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.
Landed in r92523.
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.