diff --git a/dom/media/gmp/GMPAudioDecoderParent.cpp b/dom/media/gmp/GMPAudioDecoderParent.cpp index 55b9fde9f8b9..b8a72922d50a 100644 --- a/dom/media/gmp/GMPAudioDecoderParent.cpp +++ b/dom/media/gmp/GMPAudioDecoderParent.cpp @@ -149,7 +149,7 @@ GMPAudioDecoderParent::Close() // In case this is the last reference nsRefPtr kungfudeathgrip(this); - NS_RELEASE(kungfudeathgrip); + Release(); Shutdown(); return NS_OK; diff --git a/dom/media/gmp/GMPVideoDecoderParent.cpp b/dom/media/gmp/GMPVideoDecoderParent.cpp index 319f78d42288..33690f0438e4 100644 --- a/dom/media/gmp/GMPVideoDecoderParent.cpp +++ b/dom/media/gmp/GMPVideoDecoderParent.cpp @@ -76,7 +76,7 @@ GMPVideoDecoderParent::Close() // In case this is the last reference nsRefPtr kungfudeathgrip(this); - NS_RELEASE(kungfudeathgrip); + Release(); Shutdown(); } diff --git a/dom/media/gmp/GMPVideoEncoderParent.cpp b/dom/media/gmp/GMPVideoEncoderParent.cpp index 6f2af86d9d61..f17190dab6c8 100644 --- a/dom/media/gmp/GMPVideoEncoderParent.cpp +++ b/dom/media/gmp/GMPVideoEncoderParent.cpp @@ -91,7 +91,7 @@ GMPVideoEncoderParent::Close() // In case this is the last reference nsRefPtr kungfudeathgrip(this); - NS_RELEASE(kungfudeathgrip); + Release(); Shutdown(); }