Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1139)

Unified Diff: third_party/WebKit/Source/platform/mediastream/MediaStreamSource.h

Issue 2010963002: Tidy up MediaStreamSource details. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/mediastream/MediaStreamSource.h
diff --git a/third_party/WebKit/Source/platform/mediastream/MediaStreamSource.h b/third_party/WebKit/Source/platform/mediastream/MediaStreamSource.h
index 3939e1245f4abd2556df04e9daa21dc1266eef05..ebc1852c9db560eacd8ace85fbe31f438b4766c7 100644
--- a/third_party/WebKit/Source/platform/mediastream/MediaStreamSource.h
+++ b/third_party/WebKit/Source/platform/mediastream/MediaStreamSource.h
@@ -45,7 +45,6 @@
namespace blink {
class PLATFORM_EXPORT MediaStreamSource final : public GarbageCollectedFinalized<MediaStreamSource> {
- USING_PRE_FINALIZER(MediaStreamSource, dispose);
public:
class PLATFORM_EXPORT Observer : public GarbageCollectedMixin {
public:
@@ -54,6 +53,7 @@ public:
};
class ExtraData {
+ USING_FAST_MALLOC(ExtraData);
public:
virtual ~ExtraData() { }
};
@@ -70,7 +70,6 @@ public:
};
static MediaStreamSource* create(const String& id, StreamType, const String& name, bool remote, ReadyState = ReadyStateLive, bool requiresConsumer = false);
- void dispose();
const String& id() const { return m_id; }
StreamType type() const { return m_type; }
@@ -96,6 +95,9 @@ public:
bool removeAudioConsumer(AudioDestinationConsumer*);
const HeapHashSet<Member<AudioDestinationConsumer>>& audioConsumers() { return m_audioConsumers; }
+ // |m_extraData| may hold pointers to GC objects, and it may touch them in destruction.
+ // So this class is eagerly finalized to finalize |m_extraData| promptly.
+ EAGERLY_FINALIZE();
DECLARE_TRACE();
private:

Powered by Google App Engine
This is Rietveld 408576698