Inline utility functions to reduce a promise stack size.
Merge pull request #844 from Gozala/bug/promise-stack@842347

Bug 842347 - Inline utility functions to reduce a promise stack size. r=@Mossop