Bug 1058400 - Fix AppleCMLinker assertion. r=cpearce

We call Unlink() from the failure cleanup code in Link() when
the dlopen call fails, so it's incorrect to assert that sLink
is non-null. We've already incremented the refcount, so that
check is fine.
This commit is contained in:
Ralph Giles 2014-08-26 13:26:00 -07:00
parent b50a25ed3d
commit df5cd34a6e
2 changed files with 2 additions and 2 deletions

View File

@ -73,7 +73,7 @@ fail:
AppleCMLinker::Unlink()
{
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(sLink && sRefCount > 0, "Unbalanced Unlink()");
MOZ_ASSERT(sRefCount > 0, "Unbalanced Unlink()");
--sRefCount;
if (sLink && sRefCount < 1) {
LOG("Unlinking CoreMedia framework.");

View File

@ -77,7 +77,7 @@ AppleVTLinker::Unlink()
// reference count to avoidunloading our symbols when other
// instances still need them.
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(sLink && sRefCount > 0, "Unbalanced Unlink()");
MOZ_ASSERT(sRefCount > 0, "Unbalanced Unlink()");
--sRefCount;
if (sLink && sRefCount < 1) {
LOG("Unlinking VideoToolbox framework.");