Closed Bug 1684893 Opened 3 years ago Closed 3 years ago

filteredProviderNames is leaked in nsMacSharingService.mm

Categories

(Core :: Widget: Cocoa, defect)

defect

Tracking

()

RESOLVED FIXED
86 Branch
Tracking Status
firefox86 --- fixed

People

(Reporter: jrmuizel, Assigned: mstange)

References

Details

Attachments

(1 file)

The object is autoreleased without an autorelease pool in place because it runs as a static constructor.

This was found by running with OBJC_DEBUG_MISSING_POOLS=YES LIBDISPATCH_DEBUG_MISSING_POOLS=NO

Assignee: nobody → mstange.moz
Status: NEW → ASSIGNED

There is no autorelease pool in place at the time that C++ globals are initialized, so this array
causes warnings when running with OBJC_DEBUG_MISSING_POOLS=YES LIBDISPATCH_DEBUG_MISSING_POOLS=NO.
And avoiding static initializers is a good practice anyway.

Pushed by mstange@themasta.com:
https://hg.mozilla.org/integration/autoland/rev/317486e440ae
Stop allocating an autoreleased NSArray from a C++ static initializer for filteredProviderNames. r=jrmuizel
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: