Reject double RefCountedObject inheritance in rtc::make_ref_counted.

Bug: webrtc:12701
Change-Id: Ie45707e3266e6a27cae073f824a1c77707d77000
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256240
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36281}
diff --git a/api/test/mock_peerconnectioninterface.h b/api/test/mock_peerconnectioninterface.h
index effd24e..97b2b7d 100644
--- a/api/test/mock_peerconnectioninterface.h
+++ b/api/test/mock_peerconnectioninterface.h
@@ -25,8 +25,7 @@
 
 namespace webrtc {
 
-class MockPeerConnectionInterface
-    : public rtc::RefCountedObject<webrtc::PeerConnectionInterface> {
+class MockPeerConnectionInterface : public webrtc::PeerConnectionInterface {
  public:
   static rtc::scoped_refptr<MockPeerConnectionInterface> Create() {
     return rtc::make_ref_counted<MockPeerConnectionInterface>();
@@ -199,7 +198,9 @@
   MOCK_METHOD(void, Close, (), (override));
 };
 
-static_assert(!std::is_abstract<MockPeerConnectionInterface>::value, "");
+static_assert(
+    !std::is_abstract_v<rtc::RefCountedObject<MockPeerConnectionInterface>>,
+    "");
 
 }  // namespace webrtc