Commit a6a4ba2c authored by Honglin Yu's avatar Honglin Yu Committed by Commit Bot

Correct misleading comments on RefCountedThreadSafe

In the previous CL: https://codereview.chromium.org/2747673002,
"RefCountedThreadSafe" has been used again but the comments were
not updated and misleading. And RefCountedThreadSafe does not
have virtual functions now.

BUG=None
Test=no test

Change-Id: I5d9a31a2d0f3d62af8772813db4d34e7f725773d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1742257Reviewed-by: default avatarAlbert J. Wong <ajwong@chromium.org>
Reviewed-by: default avatarTrent Apted <tapted@chromium.org>
Commit-Queue: Honglin Yu <honglinyu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#685441}
parent df1ca005
...@@ -45,11 +45,10 @@ using PassingType = std::conditional_t<std::is_scalar<T>::value, T, T&&>; ...@@ -45,11 +45,10 @@ using PassingType = std::conditional_t<std::is_scalar<T>::value, T, T&&>;
// DoInvoke function to perform the function execution. This allows // DoInvoke function to perform the function execution. This allows
// us to shield the Callback class from the types of the bound argument via // us to shield the Callback class from the types of the bound argument via
// "type erasure." // "type erasure."
// At the base level, the only task is to add reference counting data. Don't use // At the base level, the only task is to add reference counting data. Avoid
// RefCountedThreadSafe since it requires the destructor to be a virtual method. // using or inheriting any virtual functions. Creating a vtable for every
// Creating a vtable for every BindState template instantiation results in a lot // BindState template instantiation results in a lot of bloat. Its only task is
// of bloat. Its only task is to call the destructor which can be done with a // to call the destructor which can be done with a function pointer.
// function pointer.
class BASE_EXPORT BindStateBase class BASE_EXPORT BindStateBase
: public RefCountedThreadSafe<BindStateBase, BindStateBaseRefCountTraits> { : public RefCountedThreadSafe<BindStateBase, BindStateBaseRefCountTraits> {
public: public:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment