Issue #2073 - m-c 1651587: Make image::Image release efficient on main thread

This commit is contained in:
Martok 2023-01-03 23:30:46 +01:00 committed by roytam1
commit 9a39001cc3
6 changed files with 75 additions and 13 deletions

View file

@ -54,7 +54,7 @@ Decoder::~Decoder()
if (mImage && !NS_IsMainThread()) {
// Dispatch mImage to main thread to prevent it from being destructed by the
// decode thread.
NS_ReleaseOnMainThread(mImage.forget());
SurfaceCache::ReleaseImageOnMainThread(mImage.forget());
}
}