8261675: ObjectValue::set_visited(bool) sets _visited false

Reviewed-by: kvn
This commit is contained in:
Xin Liu 2021-02-17 00:24:35 +00:00 committed by Vladimir Kozlov
parent e7e20d4ec6
commit 2677f6f47d
2 changed files with 4 additions and 4 deletions

View File

@ -159,11 +159,11 @@ void ObjectValue::read_object(DebugInfoReadStream* stream) {
}
void ObjectValue::write_on(DebugInfoWriteStream* stream) {
if (_visited) {
if (is_visited()) {
stream->write_int(OBJECT_ID_CODE);
stream->write_int(_id);
} else {
_visited = true;
set_visited(true);
stream->write_int(is_auto_box() ? AUTO_BOX_OBJECT_CODE : OBJECT_CODE);
stream->write_int(_id);
_klass->write_on(stream);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2021, 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
@ -149,7 +149,7 @@ class ObjectValue: public ScopeValue {
bool is_visited() const { return _visited; }
void set_value(oop value);
void set_visited(bool visited) { _visited = false; }
void set_visited(bool visited) { _visited = visited; }
// Serialization of debugging information
void read_object(DebugInfoReadStream* stream);