DescriptionAdd DataPersistent<> for copy-on-modify and use for StyleFilterData.
Emulate what DataRef<T> provides over ref-counted objects, but
for persistent heap references. DataPersistent<T> values can
be freely copied, but when access()ed before being mutated,
DataPersistent<> ensures that the mutation will happen on
an unshared copy of the underlying heap object (of type T.)
The motivation for doing is to migrate the StyleFilterData fields
that StyleRareNonInheritedData keeps over to use DataPersistent<>
rather than DataRef<>. By doing so, StyleFilterData becomes
a simple GCed object without any ref-counting extras.
R=
BUG=604481
Committed: https://crrev.com/e5f18f7973b22a5a35fab927e2af848917e4827b
Cr-Commit-Position: refs/heads/master@{#389400}
Patch Set 1 #Patch Set 2 : rebased #Patch Set 3 : remove unused DataPersistent<>::operator=() #Patch Set 4 : add reqd copy constructor #Patch Set 5 : GarbageCollected<> only #Patch Set 6 : split out DataPersistent<> #Patch Set 7 : indirectly allocate Persistent<> #
Dependent Patchsets: Messages
Total messages: 15 (6 generated)
|