Bug 1617033 - part3 : add comment to explicitly mention some functions should only be used after starting listener. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D63916
This commit is contained in:
@@ -426,6 +426,11 @@ class HTMLMediaElement::MediaControlEventListener final
|
||||
mControlAgent = nullptr;
|
||||
}
|
||||
|
||||
bool IsStarted() const { return mState != ControlledMediaState::eStopped; }
|
||||
|
||||
/**
|
||||
* Following methods should only be used after starting listener.
|
||||
*/
|
||||
void NotifyMediaStartedPlaying() {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(IsStarted());
|
||||
@@ -474,8 +479,6 @@ class HTMLMediaElement::MediaControlEventListener final
|
||||
}
|
||||
}
|
||||
|
||||
bool IsStarted() const { return mState != ControlledMediaState::eStopped; }
|
||||
|
||||
private:
|
||||
~MediaControlEventListener() = default;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user