Bug 163549 - Rename the reject() helper function to something more meaningful.
Summary: Rename the reject() helper function to something more meaningful.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-17 10:03 PDT by Mark Lam
Modified: 2016-10-25 18:13 PDT (History)
8 users (show)

See Also:


Attachments
proposed patch. (50.57 KB, patch)
2016-10-25 17:47 PDT, Mark Lam
sbarati: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>.