| Summary: | CellAttributes should be returned by value. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Mark Lam <mark.lam> | ||||
| Component: | JavaScriptCore | Assignee: | Mark Lam <mark.lam> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | darin, ews-watchlist, keith_miller, msaboff, saam, tzagallo, webkit-bug-importer, ysuzuki | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=233341 | ||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 232849 | ||||||
| Attachments: |
|
||||||
|
Description
Mark Lam
2021-11-18 14:32:30 PST
Created attachment 444741 [details]
[fast-cq] proposed patch.
Comment on attachment 444741 [details]
[fast-cq] proposed patch.
r=me
Comment on attachment 444741 [details]
[fast-cq] proposed patch.
Thanks for the review.
Committed r286033 (244421@main): <https://commits.webkit.org/244421@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 444741 [details]. Comment on attachment 444741 [details] [fast-cq] proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=444741&action=review > Source/JavaScriptCore/heap/BlockDirectory.h:77 > + const CellAttributes attributes() const { return m_attributes; } The const here in "const CellAttributes" doesn't provide much value, and should be removed. Same in all the other sites below. When returning a scalar, specifying const has almost no effect. We don’t label functions that return an int as returning a "const int". > Source/JavaScriptCore/heap/MarkedBlock.h:350 > + const CellAttributes attributes() const; Ditto. (In reply to Darin Adler from comment #6) > Comment on attachment 444741 [details] > [fast-cq] proposed patch. > > View in context: > https://bugs.webkit.org/attachment.cgi?id=444741&action=review > > > Source/JavaScriptCore/heap/BlockDirectory.h:77 > > + const CellAttributes attributes() const { return m_attributes; } > > The const here in "const CellAttributes" doesn't provide much value, and > should be removed. Same in all the other sites below. When returning a > scalar, specifying const has almost no effect. We don’t label functions that > return an int as returning a "const int". > > > Source/JavaScriptCore/heap/MarkedBlock.h:350 > > + const CellAttributes attributes() const; > > Ditto. I'll take care of this in an upcoming patch. (In reply to Mark Lam from comment #7) > (In reply to Darin Adler from comment #6) > > > Source/JavaScriptCore/heap/BlockDirectory.h:77 > > > + const CellAttributes attributes() const { return m_attributes; } > > > > The const here in "const CellAttributes" doesn't provide much value, and > > should be removed. Same in all the other sites below. When returning a > > scalar, specifying const has almost no effect. We don’t label functions that > > return an int as returning a "const int". > > I'll take care of this in an upcoming patch. Fixing this in https://bugs.webkit.org/show_bug.cgi?id=233341. |