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
Родитель c02428d500
Коммит d7933dd7f2
3 изменённых файлов: 7 добавлений и 4 удалений

Просмотреть файл

@ -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;
}

Просмотреть файл

@ -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>

Просмотреть файл

@ -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;