Bug 143449 - Simplify ownership model of RefCounter::Count
Summary: Simplify ownership model of RefCounter::Count
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Gavin Barraclough
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-06 11:52 PDT by Gavin Barraclough
Modified: 2015-04-06 12:17 PDT (History)
3 users (show)

See Also:


Attachments
Fix (7.75 KB, patch)
2015-04-06 12:01 PDT, Gavin Barraclough
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gavin Barraclough 2015-04-06 11:52:17 PDT
Currently the count manipulated by ref/deref does not fully determine the lifetime of the object - the object is either kept alive if the refcount is non-zero, or if the owner RefCounter is still alive (separately determined). Make the object lifetime simpler by making it purely determined by the RefCount (and as such RefCounter::Count can just become a regular RefCounted). Add a new variable to track the counter value.

This patch is a step towards adding a token type that doesn't increment the count (to be able to avoid bogus churn & keep the count accurate).
Comment 1 Gavin Barraclough 2015-04-06 12:01:14 PDT
Created attachment 250216 [details]
Fix