Closed Bug 1813148 Opened 1 year ago Closed 1 year ago

Don't return already_AddRefed in nsPresContext::GetRootWidget.

Categories

(Core :: Layout, task)

task

Tracking

()

RESOLVED FIXED
111 Branch
Tracking Status
firefox111 --- fixed

People

(Reporter: emilio, Assigned: emilio)

Details

Attachments

(1 file)

No description provided.

Let the caller addref it if needed.

I wrote this because I wanted to make some code dealing with it
thread-safe, but I ended up writing a less sketchy solution. However I
still think this is worth it.

It seems this only returns an already_AddRefed because before it used to
be an XPCOM-ish thing where the widget was returned as an out-param.

For now it doesn't change behavior but there are some callers that would
benefit from having less addref/release calls if they only need to read
simple stuff from the widget.

Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a045cec2973b
Don't return already_AddRefed  in nsPresContext::GetRootWidget. r=dholbert
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 111 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: