void dec_pending_promise_count(JSObject *self) {
  MOZ_ASSERT(is_instance(self));
  auto count = JS::GetReservedSlot(self, Slots::PendingPromiseCount).toInt32();
  MOZ_ASSERT(count > 0);
  count--;
  JS::SetReservedSlot(self, Slots::PendingPromiseCount, JS::Int32Value(count));
}
void dec_pending_promise_count(JSObject *self) {
  MOZ_ASSERT(is_instance(self));
  auto count = JS::GetReservedSlot(self, Slots::PendingPromiseCount).toInt32();
  MOZ_ASSERT(count > 0);
  count--;
  JS::SetReservedSlot(self, Slots::PendingPromiseCount, JS::Int32Value(count));
}