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 110620 205475d5c2b77c88cc040fe7ad3a9d6994f48553
parent 110619 357a60386b52860f2d96a8903d4e13bd7bb25b7b
child 110621 054604aa00bd159fcd06a54efdaafef35ec40e79
push id23704
push useremorley@mozilla.com
push dateThu, 18 Oct 2012 17:12:58 +0000
treeherdermozilla-central@3779eb3f036f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs802884
milestone19.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 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;
 }