Bug 1881738 - Don't send invalid remote texture owner id when WebGLChild is destroyed. r=aosmond
It seems like Canvas2D and WebGPU already avoid sending over invalid owner ids in GetFrontBuffer. WebGL, however, can still blindly send an invalid texture owner id when the actor is being destroyed, but the WebGL context is still alive. Differential Revision: https://phabricator.services.mozilla.com/D206276
This commit is contained in:
@@ -567,6 +567,11 @@ Maybe<layers::SurfaceDescriptor> ClientWebGLContext::GetFrontBuffer(
|
||||
info.flushesSinceLastCongestionCheck = 0;
|
||||
info.congestionCheckGeneration++;
|
||||
|
||||
// If the actor is destroyed, don't send over invalid texture owner id.
|
||||
if (!child->CanSend()) {
|
||||
return {};
|
||||
}
|
||||
|
||||
return Some(layers::SurfaceDescriptorRemoteTexture(*mLastRemoteTextureId,
|
||||
*mRemoteTextureOwnerId));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user