Maybe to failAndThrowTypeErrorIfNeeded()?
I spoke with Geoff offline, and he suggested renaming reject() to typeError(). The intuition behind this is that all the clients that uses this function will return typeError(..., shouldThrow, ...). In a sense, they are returning a "type" of TypeError (which happened to be the value false). In addition, it may also throw a JS TypeError is the shouldThrow parameter is true. I think that that name works. I will go ahead and make the change.
Created attachment 292857 [details] proposed patch. Le's try this on the EWS bots first.
Comment on attachment 292857 [details] proposed patch. At least one EWS bot managed to build with this patch. I think it's ready for a review.
Comment on attachment 292857 [details] proposed patch. r=me
Thanks for the review. Landed in r207859: <http://trac.webkit.org/r207859>.