Cherry-pick #25191 to master Upstream-commit: 57698cfe7902199bed476657c8f1255af38f9f24 Component: engine