From d54712b9644b49cec6cc90a9e0c325fdfab04e7c Mon Sep 17 00:00:00 2001 From: Jeff Gilbert Date: Thu, 27 Aug 2020 00:50:32 +0000 Subject: [PATCH] Bug 1660886 - Release PWebGL when ClientWebGLContext is done with it. r=handyman,jld Differential Revision: https://phabricator.services.mozilla.com/D88067 --- dom/canvas/ClientWebGLContext.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dom/canvas/ClientWebGLContext.cpp b/dom/canvas/ClientWebGLContext.cpp index b552fc5c939d..5e264e3adb37 100644 --- a/dom/canvas/ClientWebGLContext.cpp +++ b/dom/canvas/ClientWebGLContext.cpp @@ -32,7 +32,13 @@ namespace mozilla { webgl::NotLostData::NotLostData(ClientWebGLContext& _context) : context(_context) {} -webgl::NotLostData::~NotLostData() = default; + +webgl::NotLostData::~NotLostData() { + if (outOfProcess) { + const auto& pwebgl = outOfProcess->mWebGLChild; + Unused << WebGLChild::Send__delete__(pwebgl.get()); + } +} // -