Closed Bug 1762521 Opened 3 years ago Closed 3 years ago

widget/windows/JumpListBuilder.cpp fails thread safety checks

Categories

(Core :: Widget: Win32, defect, P3)

Desktop
Windows
defect

Tracking

()

RESOLVED FIXED
101 Branch
Tracking Status
firefox101 --- fixed

People

(Reporter: bryce, Assigned: bryce)

References

Details

Attachments

(1 file)

While looking a bug 1762484 I noticed the following issues building with warnings as errors:

 0:18.27 C:/projects/mozilla/mozilla-unified/widget/windows/JumpListBuilder.cpp(112,5): error: writing variable 'mJumpListMgr' requires holding mutex 'mMonitor' exclusively [-Werror,-Wthread-safety-analysis]
 0:18.27     mJumpListMgr = jumpListMgr;
 0:18.28     ^
 0:18.28 C:/projects/mozilla/mozilla-unified/widget/windows/JumpListBuilder.cpp(143,8): error: reading variable 'mJumpListMgr' requires holding mutex 'mMonitor' [-Werror,-Wthread-safety-analysis]
 0:18.28   if (!mJumpListMgr) return NS_ERROR_NOT_AVAILABLE;
 0:18.28        ^
 0:18.28 C:/projects/mozilla/mozilla-unified/widget/windows/JumpListBuilder.cpp(145,48): error: passing variable 'mJumpListMgr' by reference requires holding mutex 'mMonitor' [-Werror,-Wthread-safety-reference]
 0:18.28   RefPtr<ICustomDestinationList> jumpListMgr = mJumpListMgr;

I.e. there may be some further work here getting the thread safety checking happy.

This fixes two cases where thread safety analysis complains about us not holding
the monitor.

Assignee: nobody → bvandyk
Status: NEW → ASSIGNED
Severity: -- → S3
Priority: -- → P3
Pushed by bvandyk@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8c1a5beae957 Add further locking to JumpListBuilder. r=mhowell,jesup
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 101 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: