Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Issue 1335573004: Introduce Range::dispose() for prompt detachment from owner Document. (Closed)

Created:
5 years, 3 months ago by sof
Modified:
5 years, 3 months ago
CC:
blink-reviews, sof, eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, groby+blinkspell_chromium.org, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Introduce 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -1 line) Patch
M Source/core/dom/Range.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/dom/Range.cpp View 1 chunk +8 lines, -0 lines 0 comments Download
M Source/core/editing/spellcheck/SpellCheckRequester.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/editing/spellcheck/SpellCheckRequester.cpp View 2 chunks +12 lines, -1 line 0 comments Download

Messages

Total messages: 17 (4 generated)
sof
please take a look. if the preference is to re-purpose detach() rather than introduce dispose(), ...
5 years, 3 months ago (2015-09-10 12:48:01 UTC) #2
yosin_UTC9
>if the preference is to re-purpose detach() rather than > introduce dispose(), then that shouldn't ...
5 years, 3 months ago (2015-09-11 01:22:27 UTC) #3
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1335573004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1335573004/20001
5 years, 3 months ago (2015-09-11 06:27:20 UTC) #5
sof
yosin writes: > I'm fine with introducing |dispose()| protocol into Blink. > > My concern ...
5 years, 3 months ago (2015-09-11 06:32:12 UTC) #6
yosin_UTC9
So, WebLocalFrameImpl.cpp doesn't use Range::dispose(). https://codereview.chromium.org/1335573004/diff/20001/Source/web/WebLocalFrameImpl.cpp File Source/web/WebLocalFrameImpl.cpp (right): https://codereview.chromium.org/1335573004/diff/20001/Source/web/WebLocalFrameImpl.cpp#newcode258 Source/web/WebLocalFrameImpl.cpp:258: RefPtrWillBeRawPtr<Range> range(document->createRange()); Thus, we ...
5 years, 3 months ago (2015-09-11 07:07:19 UTC) #7
sof
https://codereview.chromium.org/1335573004/diff/20001/Source/web/WebLocalFrameImpl.cpp File Source/web/WebLocalFrameImpl.cpp (right): https://codereview.chromium.org/1335573004/diff/20001/Source/web/WebLocalFrameImpl.cpp#newcode258 Source/web/WebLocalFrameImpl.cpp:258: RefPtrWillBeRawPtr<Range> range(document->createRange()); On 2015/09/11 07:07:19, Yosi_UTC9 wrote: > Thus, ...
5 years, 3 months ago (2015-09-11 07:11:43 UTC) #8
sof
this now looks ready to go.. (before the weekend :) ) ?
5 years, 3 months ago (2015-09-11 08:49:21 UTC) #9
yosin_UTC9
lgtm Please wait for core/dom and web/ OWNERS. I recommend to move WebLocalFrame.cpp changes to ...
5 years, 3 months ago (2015-09-11 13:07:43 UTC) #10
sof
haraken@: owner ptal? (i can certainly split out and separately expedite, if wanted.)
5 years, 3 months ago (2015-09-11 13:29:49 UTC) #11
haraken
core/ and web/ LGTM
5 years, 3 months ago (2015-09-11 13:30:27 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1335573004/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1335573004/60001
5 years, 3 months ago (2015-09-11 13:44:14 UTC) #15
commit-bot: I haz the power
Committed patchset #4 (id:60001) as https://src.chromium.org/viewvc/blink?view=rev&revision=202138
5 years, 3 months ago (2015-09-11 15:10:25 UTC) #16
commit-bot: I haz the power
5 years, 3 months ago (2015-09-23 12:22:29 UTC) #17
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/da665676d70ea64c87a8ef8d8b4b9c4d933397f5

Powered by Google App Engine
This is Rietveld 408576698