Bug 1397223 - Gracefully handle failures in SurfaceCacheImpl::StartTracking. r=tnikkel, a=lizzard
When the surface cache starts tracking an unlocked surface, it must
insert it into the expiration tracker, so that it can be freed later if
it is remains unused. ExpirationTrackerImpl::AddObjectLocked can fail
due to out-of-memory conditions or during shutdown, which we previously
ignored, and could leave us in a state where we think the surface is in
the tracker but is not. When we later try to mark the surface as used in
the tracker, it will hit a release assert because it doesn't exist. Now
we handle the insertion failure by discarding the surface. Marking the
surface as used can itself encounter a similar issue, and we handle it
the same way.
[workspace]
members = [
"ports/cef",
"ports/geckolib",
"ports/servo",
]
[profile.dev]
codegen-units = 4
[profile.release]
opt-level = 3
# Uncomment to profile on Linux:
# debug = true
# lto = false
[patch.crates-io]
# If you need to temporarily test Servo with a local fork of some upstream
# crate, add that here. Use the form:
#
# <crate> = { path = "/path/to/local/checkout" }