PendingRequestHandle pending_handle(JSObject *obj) {
  Value handle_val = JS::GetReservedSlot(obj, Slots::PendingRequest);
  if (handle_val.isInt32())
    return PendingRequestHandle{static_cast<uint32_t>(handle_val.toInt32())};
  return PendingRequestHandle{INVALID_HANDLE};
}
PendingRequestHandle pending_handle(JSObject *obj) {
  Value handle_val = JS::GetReservedSlot(obj, Slots::PendingRequest);
  if (handle_val.isInt32())
    return PendingRequestHandle{static_cast<uint32_t>(handle_val.toInt32())};
  return PendingRequestHandle{INVALID_HANDLE};
}