зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1771255: Help Device::Cleanup cope when Device::mPromise's JSObject has been cleared. r=nical
Differential Revision: https://phabricator.services.mozilla.com/D150624
This commit is contained in:
Родитель
d74bb5919c
Коммит
4d805f7ff0
|
@ -79,7 +79,8 @@ void Device::Cleanup() {
|
|||
mBridge->UnregisterDevice(mId);
|
||||
}
|
||||
|
||||
if (mLostPromise) {
|
||||
// Cycle collection may have disconnected the promise object.
|
||||
if (mLostPromise && mLostPromise->PromiseObj() != nullptr) {
|
||||
auto info = MakeRefPtr<DeviceLostInfo>(GetParentObject(),
|
||||
dom::GPUDeviceLostReason::Destroyed,
|
||||
u"Device destroyed"_ns);
|
||||
|
|
Загрузка…
Ссылка в новой задаче