зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1827050
- Check if TextureOwner exists before DUMMY_TEXTURE check r=lsalzman
TextureOwner check needs to be done before DUMMY_TEXTURE check. Crash happened because remoteTexture was nullptr in RemoteTextureMap::GetExternalImageIdOfRemoteTexture(). The remoteTexture was nullptr , since TextureOwner was already unregistered. Differential Revision: https://phabricator.services.mozilla.com/D175087
This commit is contained in:
Родитель
6c33422360
Коммит
60dadf4f06
|
@ -640,11 +640,6 @@ wr::MaybeExternalImageId RemoteTextureMap::GetExternalImageIdOfRemoteTexture(
|
|||
}
|
||||
|
||||
TextureHost* remoteTexture = it->second->mAsyncRemoteTextureHost;
|
||||
if (remoteTexture->GetFlags() & TextureFlags::DUMMY_TEXTURE) {
|
||||
// Remote texture allocation was failed.
|
||||
return Nothing();
|
||||
}
|
||||
MOZ_ASSERT(!(remoteTexture->GetFlags() & TextureFlags::DUMMY_TEXTURE));
|
||||
|
||||
auto* owner = GetTextureOwner(lock, aOwnerId, aForPid);
|
||||
if (!owner) {
|
||||
|
@ -654,6 +649,15 @@ wr::MaybeExternalImageId RemoteTextureMap::GetExternalImageIdOfRemoteTexture(
|
|||
}
|
||||
return remoteTexture->GetMaybeExternalImageId();
|
||||
}
|
||||
|
||||
if (remoteTexture &&
|
||||
remoteTexture->GetFlags() & TextureFlags::DUMMY_TEXTURE) {
|
||||
// Remote texture allocation was failed.
|
||||
return Nothing();
|
||||
}
|
||||
MOZ_ASSERT(!(remoteTexture &&
|
||||
remoteTexture->GetFlags() & TextureFlags::DUMMY_TEXTURE));
|
||||
|
||||
MOZ_ASSERT(owner);
|
||||
|
||||
if (!remoteTexture) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче