Proper GPUDevice cleanup (#32520)

* Make device cleanup right

* Use weakref for GPUDevice in globalscope

* No need to destroy device on drop

* DeviceReason early return

* make remove_gpu_device to be the only way to remove device
This commit is contained in:
Samson 2024-06-20 07:56:59 +02:00 committed by GitHub
parent 256c55eb81
commit bf99cf7f30
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 89 additions and 43 deletions

View file

@ -169,6 +169,7 @@ DOMInterfaces = {
},
'GPUDevice': {
'weakReferenceable': True, # for usage in GlobalScope https://github.com/servo/servo/issues/32519
'inRealms': ['PopErrorScope', 'CreateComputePipelineAsync', 'CreateRenderPipelineAsync'],
}