Bug 665534 - Fix unused variable warnings in nsEmbedFunctions.cpp; r=Mossop
authorEd Morley <bmo@edmorley.co.uk>
Tue, 19 Jul 2011 12:04:54 +0200
changeset 72997 fceffb1b020b068df23c67ba4982637c32af9d68
parent 72996 1ed3d5d62d91503d49639ebbf3dd01d46df0b571
child 72998 bb1f437d43351b78fe629f505c1645f1c79e5eec
push id630
push userMs2ger@gmail.com
push dateTue, 19 Jul 2011 10:07:04 +0000
treeherdermozilla-inbound@bb1f437d4335 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMossop
bugs665534
milestone8.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 665534 - Fix unused variable warnings in nsEmbedFunctions.cpp; r=Mossop
toolkit/xre/nsEmbedFunctions.cpp
--- a/toolkit/xre/nsEmbedFunctions.cpp
+++ b/toolkit/xre/nsEmbedFunctions.cpp
@@ -100,16 +100,18 @@
 #include "mozilla/dom/ContentParent.h"
 #include "mozilla/dom/ContentChild.h"
 
 #include "mozilla/jsipc/ContextWrapperParent.h"
 
 #include "mozilla/ipc/TestShellParent.h"
 #include "mozilla/ipc/XPCShellEnvironment.h"
 
+#include "mozilla/Util.h" // for DebugOnly
+
 #ifdef MOZ_IPDL_TESTS
 #include "mozilla/_ipdltest/IPDLUnitTests.h"
 #include "mozilla/_ipdltest/IPDLUnitTestProcessChild.h"
 
 using mozilla::_ipdltest::IPDLUnitTestProcessChild;
 #endif  // ifdef MOZ_IPDL_TESTS
 
 using mozilla::ipc::BrowserProcessSubThread;
@@ -412,17 +414,17 @@ XRE_InitChildProcess(int aArgc,
   NS_ABORT_IF_FALSE(parentPIDString, "NULL parent PID");
   --aArgc;
 
   char* end = 0;
   base::ProcessId parentPID = strtol(parentPIDString, &end, 10);
   NS_ABORT_IF_FALSE(!*end, "invalid parent PID");
 
   base::ProcessHandle parentHandle;
-  bool ok = base::OpenProcessHandle(parentPID, &parentHandle);
+  mozilla::DebugOnly<bool> ok = base::OpenProcessHandle(parentPID, &parentHandle);
   NS_ABORT_IF_FALSE(ok, "can't open handle to parent");
 
 #if defined(XP_WIN)
   // On Win7+, register the application user model id passed in by
   // parent. This insures windows created by the container properly
   // group with the parent app on the Win7 taskbar.
   const char* const appModelUserId = aArgv[aArgc-1];
   --aArgc;
@@ -678,17 +680,17 @@ struct RunnableMethodTraits<ContentChild
     static void ReleaseCallee(ContentChild* obj) { }
 };
 
 void
 XRE_ShutdownChildProcess()
 {
   NS_ABORT_IF_FALSE(MessageLoopForUI::current(), "Wrong thread!");
 
-  MessageLoop* ioLoop = XRE_GetIOMessageLoop();
+  mozilla::DebugOnly<MessageLoop*> ioLoop = XRE_GetIOMessageLoop();
   NS_ABORT_IF_FALSE(!!ioLoop, "Bad shutdown order");
 
   // Quit() sets off the following chain of events
   //  (1) UI loop starts quitting
   //  (2) UI loop returns from Run() in XRE_InitChildProcess()
   //  (3) ProcessChild goes out of scope and terminates the IO thread
   //  (4) ProcessChild joins the IO thread
   //  (5) exit()