RESOLVED FIXED 157693
Extend protector naming code style guideline to cover operator= assignment
https://bugs.webkit.org/show_bug.cgi?id=157693
Summary Extend protector naming code style guideline to cover operator= assignment
Brady Eidson
Reported 2016-05-13 16:41:14 PDT
Extend protector naming code style guideline to = assignment https://bugs.webkit.org/show_bug.cgi?id=157591 implemented protector naming rules like so: RefPtr<Node> protector(node); RefPtr<Node> protectedThis(this); But we need to cover operator= assignment, as well. RefPtr<Node> protector = node; RefPtr<Node> protectedThis = this;
Attachments
Patch (7.79 KB, patch)
2016-05-13 16:57 PDT, Brady Eidson
no flags
Brady Eidson
Comment 1 2016-05-13 16:43:33 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.
Brady Eidson
Comment 2 2016-05-13 16:44:58 PDT
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.
Brady Eidson
Comment 3 2016-05-13 16:57:24 PDT
WebKit Commit Bot
Comment 4 2016-05-13 21:44:49 PDT
Comment on attachment 278895 [details] Patch Clearing flags on attachment: 278895 Committed r200913: <http://trac.webkit.org/changeset/200913>
WebKit Commit Bot
Comment 5 2016-05-13 21:44:53 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.