Bug 901645: Mark some variables in content/base/src as DebugOnly. r=smaug

This commit is contained in:
Daniel Holbert 2013-08-05 21:35:08 -04:00
parent cb5a1d24f1
commit 879d9d11a9
3 changed files with 7 additions and 4 deletions

View File

@ -4379,7 +4379,8 @@ nsIPrincipal*
nsContentUtils::GetSystemPrincipal()
{
nsCOMPtr<nsIPrincipal> sysPrin;
nsresult rv = sSecurityManager->GetSystemPrincipal(getter_AddRefs(sysPrin));
DebugOnly<nsresult> rv =
sSecurityManager->GetSystemPrincipal(getter_AddRefs(sysPrin));
MOZ_ASSERT(NS_SUCCEEDED(rv) && sysPrin);
return sysPrin;
}

View File

@ -9,6 +9,8 @@
*/
#include "nsNodeInfoManager.h"
#include "mozilla/DebugOnly.h"
#include "nsNodeInfo.h"
#include "nsCOMPtr.h"
#include "nsString.h"
@ -252,8 +254,8 @@ nsNodeInfoManager::GetNodeInfo(nsIAtom *aName, nsIAtom *aPrefix,
nsRefPtr<nsNodeInfo> newNodeInfo =
new nsNodeInfo(aName, aPrefix, aNamespaceID, aNodeType, aExtraName, this);
PLHashEntry *he;
he = PL_HashTableAdd(mNodeInfoHash, &newNodeInfo->mInner, newNodeInfo);
DebugOnly<PLHashEntry*> he =
PL_HashTableAdd(mNodeInfoHash, &newNodeInfo->mInner, newNodeInfo);
MOZ_ASSERT(he, "PL_HashTableAdd() failed");
// Have to do the swap thing, because already_AddRefed<nsNodeInfo>

View File

@ -3347,7 +3347,7 @@ nsObjectLoadingContent::TeardownProtoChain()
// Loop over the DOM element's JS object prototype chain and remove
// all JS objects of the class sNPObjectJSWrapperClass
bool removed = false;
DebugOnly<bool> removed = false;
while (obj) {
if (!::JS_GetPrototype(cx, obj, &proto)) {
return;