Commit graph

7 commits

Author SHA1 Message Date
Danil Chapovalov
80b7628a55 Remove explicitly forwarded constructors in rtc::FinalRefCountedObject
those constructors may expose protected constructors that are not suppose to be public
using T::T forwards constructors with respect to protected access specifier

Bug: None
Change-Id: I3fcce0fd88bbdf538bc85baab833397f787408d8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/216240
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33840}
2021-04-27 10:10:35 +00:00
Tomas Gunnarsson
e249d195e0 Make RefCountedObject require overriding virtual methods
Bug: webrtc:12701
Change-Id: Ia4ae4ad2e857cb8790d6ccfb6f88f07d52a8e91b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215967
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33831}
2021-04-26 11:05:19 +00:00
Tomas Gunnarsson
d7842008ef Add utilities to facilitate correct usage of rtc::RefCounted classes.
We have a few places where RefCountedObject is a class that's inherited
from, whereas it's meant to be the 'final' class. We also have many
places with RefCountedObject boilerplate code that has been copy pasted
around but FinalRefCountedObject might be a better fit for the
implementation. Then there's the fact that it would be nice to reduce the
amount of required boilerplate code.

Bug: webrtc:12701
Change-Id: I0aaf55197c8640b1b17d20c7c15c8d0bb3605161
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215928
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33815}
2021-04-23 09:02:25 +00:00
Danil Chapovalov
d71e591894 Delete a gcc workaround in rtc::FinalRefCountedObject
with bot using old version of gcc removed, this workaround is not needed.

Bug: webrtc:12481
Change-Id: Ib1bfb6260c7ff5688c39fa05e8a62225700b9f27
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/213187
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33592}
2021-03-30 09:23:22 +00:00
Danil Chapovalov
8df643b387 Introduce FinalRefCountedObject template class
To add ref counting to any class while avoiding
virtual functions for reference counting.
This template can both slightly reduce binary size
and slightly improve performance.

Bug: webrtc:11308
Change-Id: I90ac735f6c220ee2a1a991a71039acdb0ca86453
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/198845
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33058}
2021-01-22 16:20:22 +00:00
Steve Anton
10542f21c8 (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries
Mechanically generated by running this command:

tools_webrtc/do-renames.sh update all-renames.txt && git cl format

Then manually updating:

tools_webrtc/sanitizers/tsan_suppressions_webrtc.cc

Bug: webrtc:10159
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I54824cd91dada8fc3ee3d098f971bc319d477833
Reviewed-on: https://webrtc-review.googlesource.com/c/115653
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26226}
2019-01-11 17:11:39 +00:00
Steve Anton
1c05765831 (3) Rename files to snake_case: move the files
Mechanically generated with this command:

tools_webrtc/do-rename.sh move all-renames.txt

Bug: webrtc:10159
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I8b05b6eab9b9d18b29c2199bbea239e9add1e690
Reviewed-on: https://webrtc-review.googlesource.com/c/115481
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26225}
2019-01-11 17:05:20 +00:00
Renamed from rtc_base/refcountedobject.h (Browse further)