зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1876536 - Part 2: Remove self refcounts within constructor in ImageBitmap r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D199978
This commit is contained in:
Родитель
7b236d5446
Коммит
139143faca
|
@ -81,7 +81,7 @@ class SendShutdownToWorkerThread : public MainThreadWorkerControlRunnable {
|
|||
*/
|
||||
class ImageBitmapShutdownObserver final : public nsIObserver {
|
||||
public:
|
||||
explicit ImageBitmapShutdownObserver() {
|
||||
void Init() {
|
||||
sShutdownMutex.AssertCurrentThreadOwns();
|
||||
if (NS_IsMainThread()) {
|
||||
RegisterObserver();
|
||||
|
@ -649,6 +649,7 @@ ImageBitmap::ImageBitmap(nsIGlobalObject* aGlobal, layers::Image* aData,
|
|||
if (!sShutdownObserver &&
|
||||
!AppShutdown::IsInOrBeyond(ShutdownPhase::XPCOMShutdown)) {
|
||||
sShutdownObserver = new ImageBitmapShutdownObserver();
|
||||
sShutdownObserver->Init();
|
||||
}
|
||||
if (sShutdownObserver) {
|
||||
mShutdownRunnable = sShutdownObserver->Track(this);
|
||||
|
|
Загрузка…
Ссылка в новой задаче