New issue
Advanced search Search tips

Issue 640749 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 578344



Sign in to add a comment

rewrite_to_chrome_style: Some type traits still get |value| -> |kValue| rewrite.

Project Member Reported by lukasza@chromium.org, Aug 24 2016

Issue description

Some type traits in wtf/TypeTraits.h are defined as a class (and therefore are not skipped by the type-trait-detecting-code in GetNameForDecl(...VarDecl...).

Examples:
- WTF::IsGarbageCollectedType<T>
- WTF::IsPersistentReferenceType<T>
- WTF::IsTraceable<T>
 
Also - some type traits are defined in |blink| namespace:

- blink::IsGarbageCollectedMixin<T>
- blink::NeedsAdjustAndMark<T>
Project Member

Comment 3 by bugdroid1@chromium.org, Aug 26 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f408e22e9f65a45f190e4571f30853cde512af6a

commit f408e22e9f65a45f190e4571f30853cde512af6a
Author: lukasza <lukasza@chromium.org>
Date: Fri Aug 26 18:25:44 2016

Extend |is_type_trait_value| matcher to cover |blink| namespace.

Also tighten up the matcher to also require that |value| field:
- is public,
- is inside a struct-or-class that doesn't have any methods.

BUG= 640749 

Review-Url: https://codereview.chromium.org/2283553002
Cr-Commit-Position: refs/heads/master@{#414751}

[modify] https://crrev.com/f408e22e9f65a45f190e4571f30853cde512af6a/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp
[modify] https://crrev.com/f408e22e9f65a45f190e4571f30853cde512af6a/tools/clang/rewrite_to_chrome_style/tests/fields-expected.cc
[modify] https://crrev.com/f408e22e9f65a45f190e4571f30853cde512af6a/tools/clang/rewrite_to_chrome_style/tests/fields-original.cc

Project Member

Comment 5 by bugdroid1@chromium.org, Sep 13 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1c4e7baae394ba46842f177de2829face052faa5

commit 1c4e7baae394ba46842f177de2829face052faa5
Author: lukasza <lukasza@chromium.org>
Date: Tue Sep 13 01:29:50 2016

s/Value/value/g for type trait value field in WebGLImageConversion.cpp

Lowercase |value| is desirable:

- For consistency with other type traits:
  - in WTF - e.g. WTF::IsAssignable<T>::value
  - in standard library - e.g. std::is_base_of<T1, T2>::value
  - in v8 - e.g. IsIntegerArithmeticSafe<T, Lhs, Rhs>::value

- To help |rewrite_to_chrome_style| tool.

BUG= 640749 

Review-Url: https://codereview.chromium.org/2325563005
Cr-Commit-Position: refs/heads/master@{#418134}

[modify] https://crrev.com/1c4e7baae394ba46842f177de2829face052faa5/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp

Comment 6 by dcheng@chromium.org, Dec 19 2016

Is this fixed, or are there still more instances?
Status: Fixed (was: Started)
No more known instances of this.

Sign in to add a comment