Bug 129052 - [JS] Convert Promise.prototype.catch to be a built-in
Summary: [JS] Convert Promise.prototype.catch to be a built-in
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sam Weinig
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-19 10:57 PST by Sam Weinig
Modified: 2014-02-19 15:26 PST (History)
1 user (show)

See Also:


Attachments
Patch (6.80 KB, patch)
2014-02-19 11:00 PST, Sam Weinig
no flags Details | Formatted Diff | Diff
Patch (6.63 KB, patch)
2014-02-19 14:32 PST, Sam Weinig
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Weinig 2014-02-19 10:57:37 PST
[JS] Convert Promise.prototype.catch to be a built-in
Comment 1 Sam Weinig 2014-02-19 11:00:02 PST
Created attachment 224656 [details]
Patch
Comment 2 Geoffrey Garen 2014-02-19 12:15:59 PST
Comment on attachment 224656 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=224656&action=review

> Source/JavaScriptCore/builtins/Promise.prototype.js:33
> +    var then = this.then;
> +    if (typeof then !== "function")
> +        throw new @TypeError("Promise.prototype.catch requires that |onRejected| be a function");
> +
> +    return then.@call(this, undefined, onRejected);

return this.then(undefined, onRejected);
Comment 3 Sam Weinig 2014-02-19 14:32:10 PST
Created attachment 224677 [details]
Patch
Comment 4 Geoffrey Garen 2014-02-19 14:47:32 PST
Comment on attachment 224677 [details]
Patch

r=me
Comment 5 WebKit Commit Bot 2014-02-19 15:26:10 PST
Comment on attachment 224677 [details]
Patch

Clearing flags on attachment: 224677

Committed r164396: <http://trac.webkit.org/changeset/164396>
Comment 6 WebKit Commit Bot 2014-02-19 15:26:12 PST
All reviewed patches have been landed.  Closing bug.