Summary: | Extend protector naming code style guideline to cover operator= assignment | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Brady Eidson <beidson> | ||||
Component: | Tools / Tests | Assignee: | Brady Eidson <beidson> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | commit-queue, darin, glenn, lforschler | ||||
Priority: | P2 | ||||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=157591 | ||||||
Attachments: |
|
Description
Brady Eidson
2016-05-13 16:41:14 PDT
(In reply to comment #0) > > But we need to cover operator= assignment, as well. > RefPtr<Node> protector = node; > RefPtr<Node> protectedThis = this; There's two ways to cover these cases: 1 - Extend the rule to enforce proper naming in these cases 2 - Extend the rule to disallow these cases and to prefer protector(node)-style initialization, instead. Since a consensus has been reached on the name of these variables, but no discussion has taken place on disallowing operator= style assignment to these protectors, I'm going to go with #1 and just enforce the name. If contributors later decide to disallow operator= style, that can be an easy change. Created attachment 278895 [details]
Patch
Comment on attachment 278895 [details] Patch Clearing flags on attachment: 278895 Committed r200913: <http://trac.webkit.org/changeset/200913> All reviewed patches have been landed. Closing bug. |