Generally speaking, a rimmed revolver cartridge of equal or lower pressure and with other compatible dimensions (bullet diameter, case diameter, etc.) can be fired in a revolver in a more powerful chambering without any issues.
It gets trickier when the cartridges are rimless, even in revolvers. It has to do with how the chamber is cut. Rimmed revolver cartridges are held in place by the rim so there's no need to cut a "step" in the forward part of the chamber to headspace off the case mouth. But a rimless cartridge has to headspace on the case mouth unless the revolver is to be shot exclusively with moonclips.
That step will collect fouling and possibly even bullet material when shot with a shorter cartridge. That could cause malfunctions if it's too difficult to chamber a round, but it could also result in a pressure increase when shot with the nominal chambering for the gun if the material interferes with the bullet and case. In an autopistol for example, the slide rams the cartridge into place. If it wedges the case mouth into a bunch of shaved bullet material and fouling that prevents the case from releasing the bullet normally, or if some of the material partially obstructs things, there can be a pressure spike. This isn't all that likely, but it is possible.
Anyway, all that to say, unless a manufacturer specifically states that the practice is safe it's not a good idea to ever fire any rimless round in a chamber that's too long for it. As far as I know, there are no manufacturers allowing/recommending any rimless cartridge, other than the nominal chambering, to be fired in any autopistol.
S&W does state it's fine to shoot .40S&W in their 10mm revolvers. Ruger does not, although they don't cite safety concerns--they indicate it could result in misfires.
It gets trickier when the cartridges are rimless, even in revolvers. It has to do with how the chamber is cut. Rimmed revolver cartridges are held in place by the rim so there's no need to cut a "step" in the forward part of the chamber to headspace off the case mouth. But a rimless cartridge has to headspace on the case mouth unless the revolver is to be shot exclusively with moonclips.
That step will collect fouling and possibly even bullet material when shot with a shorter cartridge. That could cause malfunctions if it's too difficult to chamber a round, but it could also result in a pressure increase when shot with the nominal chambering for the gun if the material interferes with the bullet and case. In an autopistol for example, the slide rams the cartridge into place. If it wedges the case mouth into a bunch of shaved bullet material and fouling that prevents the case from releasing the bullet normally, or if some of the material partially obstructs things, there can be a pressure spike. This isn't all that likely, but it is possible.
Anyway, all that to say, unless a manufacturer specifically states that the practice is safe it's not a good idea to ever fire any rimless round in a chamber that's too long for it. As far as I know, there are no manufacturers allowing/recommending any rimless cartridge, other than the nominal chambering, to be fired in any autopistol.
S&W does state it's fine to shoot .40S&W in their 10mm revolvers. Ruger does not, although they don't cite safety concerns--they indicate it could result in misfires.