Bug 589907 - Fix unused variable warning in docshell/ r=benjamin a=npob (debug warning)
authorMs2ger <Ms2ger@gmail.com>
Sun, 05 Dec 2010 15:38:30 +0000
changeset 58636 4222674401bab63c2bb3a4d94df123d230babdd4
parent 58635 8b738045e4fd646cab12aee01ba7288fa96f56a8
child 58637 bfec67c46b7cb58ad3149016076ccecd261e01f7
push id17390
push userjwatt@jwatt.org
push dateSun, 05 Dec 2010 15:41:18 +0000
treeherdermozilla-central@4222674401ba [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbenjamin, npob
bugs589907
milestone2.0b8pre
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 589907 - Fix unused variable warning in docshell/ r=benjamin a=npob (debug warning)
docshell/base/nsDocShell.cpp
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -1,11 +1,11 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * vim: ft=cpp tw=78 sw=4 et ts=4 sts=4 cin
- * ***** BEGIN LICENSE BLOCK *****
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* vim: ft=cpp tw=78 sw=4 et ts=8 sts=4 cin */
+/* ***** BEGIN LICENSE BLOCK *****
  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  *
  * The contents of this file are subject to the Mozilla Public License Version
  * 1.1 (the "License"); you may not use this file except in compliance with
  * the License. You may obtain a copy of the License at
  * http://www.mozilla.org/MPL/
  *
  * Software distributed under the License is distributed on an "AS IS" basis,
@@ -6571,22 +6571,25 @@ void
 nsDocShell::ReattachEditorToWindow(nsISHEntry *aSHEntry)
 {
     NS_ASSERTION(!mEditorData,
                  "Why reattach an editor when we already have one?");
     NS_ASSERTION(aSHEntry && aSHEntry->HasDetachedEditor(),
                  "Reattaching when there's not a detached editor.");
 
     if (mEditorData || !aSHEntry)
-      return;
+        return;
 
     mEditorData = aSHEntry->ForgetEditorData();
     if (mEditorData) {
-        nsresult res = mEditorData->ReattachToWindow(this);
-        NS_ASSERTION(NS_SUCCEEDED(res), "Failed to reattach editing session");
+#ifdef DEBUG
+        nsresult rv =
+#endif
+        mEditorData->ReattachToWindow(this);
+        NS_ASSERTION(NS_SUCCEEDED(rv), "Failed to reattach editing session");
     }
 }
 
 void
 nsDocShell::DetachEditorFromWindow()
 {
     if (!mEditorData || mEditorData->WaitingForLoad()) {
         // If there's nothing to detach, or if the editor data is actually set