Bug 163549

Summary: Rename the reject() helper function to something more meaningful.
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: JavaScriptCoreAssignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, fpizlo, ggaren, jfbastien, keith_miller, msaboff, saam, ysuzuki
Priority: P2    
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
proposed patch. saam: review+

Description Mark Lam 2016-10-17 10:03:48 PDT
Maybe to failAndThrowTypeErrorIfNeeded()?
Comment 1 Mark Lam 2016-10-25 17:15:34 PDT
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.
Comment 2 Mark Lam 2016-10-25 17:47:59 PDT
Created attachment 292857 [details]
proposed patch.

Le's try this on the EWS bots first.
Comment 3 Mark Lam 2016-10-25 18:07:37 PDT
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 4 Saam Barati 2016-10-25 18:10:25 PDT
Comment on attachment 292857 [details]
proposed patch.

r=me
Comment 5 Mark Lam 2016-10-25 18:13:58 PDT
Thanks for the review.  Landed in r207859: <http://trac.webkit.org/r207859>.