Make TextureClient more robust against racy shutdown situations

RESOLVED FIXED in Firefox 49

Status

()

Core
Graphics: Layers
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: nical, Assigned: nical)

Tracking

(Blocks: 1 bug)

unspecified
mozilla49
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox49 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
As discussed with Bas, Jamie and Edwin, the plan is to protect TextureClient's methods that access mData or mActor with a mutex and hold on to that mutex while the TextureData is locked so that shutdown cannot race with some other thread reading from a texture.
(Assignee)

Updated

2 years ago
Assignee: nobody → nical.bugzilla
Blocks: 1264293
(Assignee)

Comment 1

2 years ago
Created attachment 8743866 [details] [diff] [review]
Lock ALL THE THINGS.

I ended up putting the lock on the IPDL actor to reduce the likelihood of AsTextureClient() racing with the destruction of a texture from another thread. It's not entirely race-free however, but removing the few cycles that constitute that race a lot of work so I'd rather we do it as a followup considering this patch should improve the situation significantly.
Attachment #8743866 - Flags: review?(bas)
Attachment #8743866 - Flags: review?(bas) → review+

Comment 2

2 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/744c91c9c803

Comment 3

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/744c91c9c803
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox49: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49

Updated

2 years ago
Depends on: 1283375
You need to log in before you can comment on or make changes to this bug.