(imported from commit eb0a9466b9064f89322ab593134af0761caeea8a)
(imported from commit 81d7e010f6316dfbe0ce7b645a7b61dde2881483)