Names of onError method and OnError type differ only by the case of the first character |
||
Issue descriptionthird_party/WebKit/Source/bindings/core/v8/CallbackPromiseAdapter.h defines OnError and OnSuccess classes, which override onError and onSuccess virtual methods from third_party/WebKit/public/platform/WebCallbacks.h Let's use this bug to discuss how to rename things (either the types or the methods) so they don't collide after the "big rename".
,
Dec 12 2016
Maybe we can: - Rename OnError to OnErrorAdapter - Rename OnSuccess to OnSuccessAdapter This is would: - make dcheng@ happy (who thought that onErrorHandler looks a bit weird - this prompted me to open this bug :-) - be consistent with names of other types in third_party/WebKit/Source/bindings/core/v8/CallbackPromiseAdapter.h (i.e. CallbackPromiseAdapter<S, T> is derived from OnError type) - result in a relatively small changes (so low git blame noise). Chromium code search says that there are 38 overrides of onError and 50 overrides of onSuccess method and that there are only a handful of references to the OnError and OnSuccess types FWIW, I searched for '\bOnError\b' and '\bOnSuccess\b' and didn't find any other types with such names under third_party/WebKit/Source.
,
Dec 14 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/18c69c35b756dca9096cf2fc0ab69d4b6d7ddba5 commit 18c69c35b756dca9096cf2fc0ab69d4b6d7ddba5 Author: lukasza <lukasza@chromium.org> Date: Wed Dec 14 19:17:55 2016 Rename OnError to OnErrorAdapter and OnSuccess to OnSucessAdapter. The rename is needed to avoid a naming collision after changing from Blink to Chromium naming style. Right now we have an |OnError| type and an |onError| virtual method (differing by case of the first character); after a naive rename by the rewrite_to_chrome_style tool we would end up with |OnError| being the name of both the type and the method (with both living in the same namespace). Similar situation happens for onSuccess / OnSuccess names. Changing the type name is a workaround that fits into the guidance on the recommended post-Blink-to-Chromium-rename style suggested by esprehn@ in https://crbug.com/582312#c17 : - Getters favor not using "Get", ex. FirstChild() - Unless the type name conflicts, in which case you can either rename the type if it's easy and makes sense, or add "Get", ex. GetContext(). BUG= 673480 Review-Url: https://codereview.chromium.org/2570193002 Cr-Commit-Position: refs/heads/master@{#438579} [modify] https://crrev.com/18c69c35b756dca9096cf2fc0ab69d4b6d7ddba5/third_party/WebKit/Source/bindings/core/v8/CallbackPromiseAdapter.h
,
Dec 20 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f045da4e3024621ab0fcbb336c2faf5fe9b244e7 commit f045da4e3024621ab0fcbb336c2faf5fe9b244e7 Author: lukasza <lukasza@chromium.org> Date: Tue Dec 20 01:05:44 2016 Rename blink::SelectorChecker::Match enum type to MatchStatus. The rename is needed to avoid a naming collision after changing from Blink to Chromium naming style. Right now we have an |Match| enum type and a |match| method (differing by case of the first character); after a naive rename by the rewrite_to_chrome_style tool we would end up with |Match| being the name of both the type and the method (with both living in the same namespace). Changing the type name is a workaround that fits into the guidance on the recommended post-Blink-to-Chromium-rename style suggested by esprehn@ in https://crbug.com/582312#c17 : - Getters favor not using "Get", ex. FirstChild() - Unless the type name conflicts, in which case you can either rename the type if it's easy and makes sense, or add "Get", ex. GetContext(). BUG= 673480 Review-Url: https://codereview.chromium.org/2588103003 Cr-Commit-Position: refs/heads/master@{#439646} [modify] https://crrev.com/f045da4e3024621ab0fcbb336c2faf5fe9b244e7/third_party/WebKit/Source/core/css/SelectorChecker.cpp [modify] https://crrev.com/f045da4e3024621ab0fcbb336c2faf5fe9b244e7/third_party/WebKit/Source/core/css/SelectorChecker.h
,
Jan 5 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by esprehn@chromium.org
, Dec 12 2016