Bug 802884 - Fix a build failure in Visual C++ 2012 because of what seems to be a compiler bug; r=me
authorEhsan Akhgari <ehsan@mozilla.com>
Wed, 17 Oct 2012 20:07:05 -0400
changeset 110752 205475d5c2b77c88cc040fe7ad3a9d6994f48553
parent 110751 357a60386b52860f2d96a8903d4e13bd7bb25b7b
child 110753 054604aa00bd159fcd06a54efdaafef35ec40e79
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersme
bugs802884
milestone19.0a1
Bug 802884 - Fix a build failure in Visual C++ 2012 because of what seems to be a compiler bug; r=me
editor/libeditor/html/nsHTMLEditor.cpp
--- a/editor/libeditor/html/nsHTMLEditor.cpp
+++ b/editor/libeditor/html/nsHTMLEditor.cpp
@@ -758,17 +758,21 @@ nsHTMLEditor::NodeIsBlockStatic(const do
       tagAtom==nsEditProperty::dt         ||
       tagAtom==nsEditProperty::dd         ||
       tagAtom==nsEditProperty::pre)
   {
     return true;
   }
 
   bool isBlock;
-  DebugOnly<nsresult> rv = nsContentUtils::GetParserService()->
+#ifdef DEBUG
+  // XXX we can't use DebugOnly here because VC++ is stupid (bug 802884)
+  nsresult rv =
+#endif
+    nsContentUtils::GetParserService()->
     IsBlock(nsContentUtils::GetParserService()->HTMLAtomTagToId(tagAtom),
             isBlock);
   MOZ_ASSERT(rv == NS_OK);
 
   AssertParserServiceIsCorrect(tagAtom, isBlock);
 
   return isBlock;
 }