inspector: refactor inspector/promises to be more robust
#45041
Merged
inspector/promises to be more robust
#45041