Bug 805606: Add DebugOnly annotation to fix build warning in nsXBLDocumentInfo.cpp. r=Ms2ger
authorDaniel Holbert <dholbert@cs.stanford.edu>
Fri, 26 Oct 2012 10:49:57 -0700
changeset 111632 d7ab11d4f000298af1574e5e4109a49585801575
parent 111631 80e4065a329edd3adbc048d7c82813fec34f6333
child 111633 f710c3eb66ed97551fd347bcce3a4bdd9bf302ac
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersMs2ger
bugs805606
milestone19.0a1
Bug 805606: Add DebugOnly annotation to fix build warning in nsXBLDocumentInfo.cpp. r=Ms2ger
content/xbl/src/nsXBLDocumentInfo.cpp
--- a/content/xbl/src/nsXBLDocumentInfo.cpp
+++ b/content/xbl/src/nsXBLDocumentInfo.cpp
@@ -24,16 +24,17 @@
 #include "nsContentUtils.h"
 #include "nsDOMJSUtils.h"
 #include "mozilla/Services.h"
 #include "xpcpublic.h"
 #include "mozilla/scache/StartupCache.h"
 #include "mozilla/scache/StartupCacheUtils.h"
 #include "nsCCUncollectableMarker.h"
 #include "mozilla/dom/BindingUtils.h"
+#include "mozilla/Util.h"
 
 using namespace mozilla::scache;
 using namespace mozilla;
 
 static const char kXBLCachePrefix[] = "xblcache";
 
 static NS_DEFINE_CID(kDOMScriptObjectFactoryCID, NS_DOM_SCRIPT_OBJECT_FACTORY_CID);
 
@@ -259,17 +260,17 @@ nsXBLDocGlobalObject::EnsureScriptEnviro
 
   nsCOMPtr<nsIScriptContext> newCtx = scriptRuntime->CreateContext();
   MOZ_ASSERT(newCtx);
 
   newCtx->WillInitializeContext();
   // NOTE: We init this context with a NULL global, so we automatically
   // hook up to the existing nsIScriptGlobalObject global setup by
   // nsGlobalWindow.
-  nsresult rv = newCtx->InitContext();
+  DebugOnly<nsresult> rv = newCtx->InitContext();
   NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Script Language's InitContext failed");
   newCtx->SetGCOnDestruction(false);
   newCtx->DidInitializeContext();
 
   mScriptContext = newCtx;
 
   JSContext *cx = mScriptContext->GetNativeContext();
   JSAutoRequest ar(cx);