Bug 107717 - Assert that Supplementable objects are only used in their creator thread
Summary: Assert that Supplementable objects are only used in their creator thread
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-23 12:18 PST by Mark Lam
Modified: 2013-01-23 13:28 PST (History)
2 users (show)

See Also:


Attachments
The patch. (2.91 KB, patch)
2013-01-23 12:29 PST, Mark Lam
abarth: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2013-01-23 12:18:42 PST
Supplementable and Supplement instances should only be used in the thread that created them.  Adding an assertion to help detect when someone is unknowingly violating this design premise.
Comment 1 Mark Lam 2013-01-23 12:29:54 PST
Created attachment 184282 [details]
The patch.
Comment 2 Adam Barth 2013-01-23 13:16:08 PST
Comment on attachment 184282 [details]
The patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=184282&action=review

> Source/WebCore/platform/Supplementable.h:128
> +    ThreadIdentifier m_threadId;

I wonder if this is the right thing for code that uses libdispatch.  I think there's some other notion of thread affinity that we're supposed to use in those cases.
Comment 3 Mark Lam 2013-01-23 13:28:40 PST
Landed in r140580: <http://trac.webkit.org/changeset/140580>