internal void AddValue(QuickJSRefcounted value) { #if NET20 if (_values.Contains(value)) { return; } #endif _values.Add(value); }
internal void ReleaseInContextThread(QuickJSRefcounted value) { if (value is null) { return; } lock (_finalizedValues) { _finalizedValues.Add(value); } }
private QuickJSValue(QuickJSContext context, JSValue value) { if (context is null) { throw new ArgumentOutOfRangeException(nameof(context)); } if (value.Tag != JSTag.Object) { throw new ArgumentOutOfRangeException(nameof(value)); } _refcounted = new QuickJSRefcounted(context, value); context.AddValue(_refcounted); }
internal void RemoveValue(QuickJSRefcounted value) { _values.Remove(value); }