Bug 79864 - RefCounted::deprecatedTurnOfVerifier() should not be deprecated
Summary: RefCounted::deprecatedTurnOfVerifier() should not be deprecated
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-28 21:10 PST by Filip Pizlo
Modified: 2012-02-29 16:15 PST (History)
0 users

See Also:


Attachments
the patch (4.23 KB, patch)
2012-02-28 22:28 PST, Filip Pizlo
oliver: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2012-02-28 21:10:20 PST
It is necessary to call this in the constructor of many objects in JavaScriptCore, because JavaScriptCore objects may be used from multiple threads even if the reference counting is done in a racy manner. This is because a JSC instance may be used from multiple threads so long as all accesses into that instance are protected by a per-instance lock. It would be absolutely wrong to prohibit this pattern, and it would be a disastrous regression to requite that the objects within that instance use a thread-safe version of reference counting.

Hence the notion that this method should be deprecated is entirely misguided until a credible, low-overhead verifier is implemented, which can understand JavaScriptCore's well-designed thread safety patterns while also not created confusing noise in our code base.
Comment 1 Filip Pizlo 2012-02-28 22:28:18 PST
Created attachment 129390 [details]
the patch
Comment 2 Filip Pizlo 2012-02-29 16:15:26 PST
Landed in http://trac.webkit.org/changeset/109268