Open Bug 1751306 Opened 3 years ago Updated 2 years ago

Make RuntimeSettings.Pref thread safe

Categories

(GeckoView :: General, defect, P2)

Unspecified
All
defect

Tracking

(Not tracked)

People

(Reporter: mcomella, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(4 obsolete files)

Break-out from bug 1750896 – I was in a good position to fix this portion of the bug so I took a stab at it.

Note: an alternative to making this class thread safe is to confine usage of the Pref class to specific threads only. If we decide to go that route in bug 1750896, this patch isn't needed (though maybe we'd want to use the ConcurrentTestRule elsewhere).

This test is @Ignore in this commit because it introduces an intentional test
failure that uncovers the concurrency bug.

Depends on D136546

The class is technically not thread safe yet because a reference to the
unsynchronized class is leaked from the constructor: this will be addressed in
the next commit for clarity.

Depends on D136547

This completes making RuntimeSettings.Pref thread safe.

As far as I can tell in the current implementation, the values passed to Pref
(of type T) are all thread safe because they are immutable so there are no
additional concurrency bugs created by those values.

Depends on D136548

Severity: -- → S3
Priority: -- → P2

Fixing concurrency bugs isn't my main focus so I'm concerned changing the concurrency test to fit existing GV patterns would take too long for me. We could land the code without the test or someone can pick up where I left off on the test.

I'm not actively working on moving this forward so unassigning.

Assignee: michael.l.comella → nobody
Attachment #9260037 - Attachment is obsolete: true
Attachment #9260034 - Attachment is obsolete: true
Attachment #9260035 - Attachment is obsolete: true
Attachment #9260036 - Attachment is obsolete: true

Without checking the code, I assume ths bug is still relevant but I'm too far away from the code to continue to work on this. My patches are probably still relevant too but they've probably bitrotted a bit.

Flags: needinfo?(michael.l.comella)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: