DescriptionIntroduce Range::dispose() for prompt detachment from owner Document.
With Oilpan, Range objects become detached from their Document once GC
determines that the Range object is no longer referred to and can be
swept out, along with clearing out the object from the Document's weak
map. If GCs aren't otherwise being triggered regularly, this can in
some cases lead to unnecessary buildup of weakly held, but effectively
dead objects in that Document map. Something which slows down GC once
it eventually strikes.
To address, we introduce a dispose() method over Range so as to let code
handle the cases where it is known that the Range object is no longer
referenced & used and can be promptly detached from its Document. Less
GC overhead being the (desired) result.
R=yosin,haraken
BUG=388681
Committed: https://crrev.com/da665676d70ea64c87a8ef8d8b4b9c4d933397f5
git-svn-id: svn://svn.chromium.org/blink/trunk@202138 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Patch Set 1 #
Total comments: 2
Patch Set 2 : replace use of selectNodeContents() also #
Total comments: 2
Patch Set 3 : completely simplify away Range allocation #Patch Set 4 : split out rangeContents() switch #
Messages
Total messages: 17 (4 generated)
|