| Summary: | [JSC] Optimize Promise#finally by avoiding creating multiple environments | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Yusuke Suzuki <ysuzuki> | ||||
| Component: | New Bugs | Assignee: | Yusuke Suzuki <ysuzuki> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | ews-watchlist, joepeck, keith_miller, mark.lam, msaboff, ross.kirsling, saam, tzagallo, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Yusuke Suzuki
2020-09-16 23:00:26 PDT
Created attachment 408992 [details]
Patch
Comment on attachment 408992 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=408992&action=review Seems fine to me. > Source/JavaScriptCore/builtins/PromisePrototype.js:74 > + thenFinally = (0, /* prevent function name inference */ (value) => { nit: Seems like this could be a line comment above? But I don't feel that strongly. Comment on attachment 408992 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=408992&action=review >> Source/JavaScriptCore/builtins/PromisePrototype.js:74 >> + thenFinally = (0, /* prevent function name inference */ (value) => { > > nit: Seems like this could be a line comment above? But I don't feel that strongly. I think this is because `(0, expr)` looks super tricky, and this inlined comment helps readers to understand why this comma expression exists. I think this prefixed comment is nice for consistency since we are using this style in the other places. Committed r267184: <https://trac.webkit.org/changeset/267184> All reviewed patches have been landed. Closing bug and clearing flags on attachment 408992 [details]. |