docs: private Object ownership(Object val, boolean forceShared) {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              JmfTr.entry(this, tc, "ownership", new Object[] { val, Boolean.valueOf(forceShared) });
  
          if (val instanceof JSMessageData) {
              ((JSMessageData) val).setParent(compatibilityWrapperOrSelf);
  
              if (forceShared) {
                  ((JSMessageData) val).sharedContents = true;
              }
          }
          else if (val instanceof JMFEncapsulation) {
              ((JMFEncapsulation) val).setContainingMessageData(compatibilityWrapperOrSelf);
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              JmfTr.exit(this, tc, "ownership", val);
          return val;
      }