Closed Bug 1703144 Opened 4 years ago Closed 4 years ago

Get rid of `MOZ_KnownLive` for `EditorBase::SelectionRefPtr()`

Categories

(Core :: DOM: Editor, task, P3)

task

Tracking

()

RESOLVED FIXED
89 Branch
Tracking Status
firefox89 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

Attachments

(1 file)

Since bug 1691515 is landed, we can mark member method result as its lifetime is guaranteed. EditorBase::SelectionRefPtr() returns Selection grabbed by AutoEditActionDataSetter which is firstly put on the stack at editor starting to handle anything. Therefore, we can get rid of MOZ_KnownLive(SelectionRefPtr()) etc.

The lifetime of it is guaranteed by AutoEditActionDataSetter which grabs
Selection until it's destroyed, and it's a stack only class and created
at first step of all public method calls. Therefore, we can mark it as
MOZ_KNOWN_LIVE and we can change it returning reference of Selection
instead of reference of RefPtr<Selection>.

Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/724cb7aaa828 Get rid of `MOZ_KnownLive` for `EditorBase::SelectionRefPtr()` r=m_kato
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: