< prev index next >

src/share/vm/utilities/xmlstream.cpp

Print this page
rev 7613 : imported patch vmassert
rev 7616 : [mq]: copyrights

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -31,10 +31,14 @@
 #include "oops/oop.inline.hpp"
 #include "runtime/deoptimization.hpp"
 #include "runtime/vmThread.hpp"
 #include "utilities/xmlstream.hpp"
 
+// Do not assert this condition if there's already another error reported.
+#define assert_if_no_error(cond, msg) \
+  vmassert((cond) || is_error_reported(), msg)
+
 void xmlStream::initialize(outputStream* out) {
   _out = out;
   _last_flush = 0;
   _markup_state = BODY;
   _text_init._outer_xmlStream = this;
< prev index next >