8167995: -Xlog:defaultmethods=debug: lengthy method descriptor triggers "StringStream is re-allocated with a different ResourceMark"

Removed nested ResourceMark declarations

Reviewed-by: dholmes, hseigel
This commit is contained in:
Rachel Protacio 2016-10-26 15:46:13 -04:00
parent fd45fd98b7
commit 420a682afa

View file

@ -77,12 +77,10 @@ class PseudoScope : public ResourceObj {
};
static void print_slot(outputStream* str, Symbol* name, Symbol* signature) {
ResourceMark rm;
str->print("%s%s", name->as_C_string(), signature->as_C_string());
}
static void print_method(outputStream* str, Method* mo, bool with_class=true) {
ResourceMark rm;
if (with_class) {
str->print("%s.", mo->klass_name()->as_C_string());
}