src/hotspot/share/services/serviceUtil.hpp
changeset 48787 7638bf98a312
parent 47216 71c04702a3d5
child 49063 c21904b367f4
equal deleted inserted replaced
48786:cc231bd80c8b 48787:7638bf98a312
     1 /*
     1 /*
     2  * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    37  public:
    37  public:
    38 
    38 
    39   // Return true if oop represents an object that is "visible"
    39   // Return true if oop represents an object that is "visible"
    40   // to the java world.
    40   // to the java world.
    41   static inline bool visible_oop(oop o) {
    41   static inline bool visible_oop(oop o) {
    42     // the sentinel for deleted handles isn't visible
       
    43     if (o == JNIHandles::deleted_handle()) {
       
    44       return false;
       
    45     }
       
    46 
       
    47     // instance
    42     // instance
    48     if (o->is_instance()) {
    43     if (o->is_instance()) {
    49       // instance objects are visible
    44       // instance objects are visible
    50       if (o->klass() != SystemDictionary::Class_klass()) {
    45       if (o->klass() != SystemDictionary::Class_klass()) {
    51         return true;
    46         return true;