Closed Bug 1513547 Opened 6 years ago Closed 6 years ago

autocopy leaves tons of Selection objects around until the next cycle collection

Categories

(Core :: DOM: Selection, enhancement, P2)

Unspecified
Linux
enhancement

Tracking

()

RESOLVED FIXED
mozilla66
Tracking Status
firefox66 --- fixed

People

(Reporter: smaug, Assigned: smaug)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

... and since Selections are around, that affects to performance of painting of selection on Linux.
Attached patch auto_copy_selections.diff (obsolete) — Splinter Review
remote: View your change here: remote: https://hg.mozilla.org/try/rev/62322f4f05b87281aec487620c62e4ccbd4fdc35 remote: remote: Follow the progress of your build on Treeherder: remote: https://treeherder.mozilla.org/#/jobs?repo=try&revision=62322f4f05b87281aec487620c62e4ccbd4fdc35
Priority: -- → P2
Comment on attachment 9030901 [details] [diff] [review] auto_copy_selections.diff Since this is similar issue as bug 1376936, perhaps you ehsan could review this? Trying to clean up stuff sooner using _LAST_RELEASE And Range objects shouldn't need to keep selection alive, it is selection which needs to keep range objects alive. (this way there isn't cycle selection->range->selection) The normal Selection objects stay alive, since nsFrameSelection has an array of RefPtr<Selection> objects, but https://searchfox.org/mozilla-central/rev/3160ddc1f0ab55d230c595366662c62950e5c785/dom/base/nsCopySupport.cpp#310 and https://searchfox.org/mozilla-central/rev/adcc169dcf58c2e45ba65c4ed5661d666fc3ac74/dom/base/nsDocumentEncoder.cpp#1195 create temporary Selections.
Attachment #9030901 - Flags: review?(ehsan)
Attached patch fixed a commentSplinter Review
Attachment #9030901 - Attachment is obsolete: true
Attachment #9030901 - Flags: review?(ehsan)
Attachment #9030947 - Flags: review?(ehsan)
Attachment #9030947 - Flags: review?(ehsan) → review+
Pushed by opettay@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/f20886290ab0 ensure selection objects created for autocopy are cleared as soon as possible, r=ehsan
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: