PermissionStatus::PermissionStatus(nsPIDOMWindowInner* aWindow, PermissionName aName) : DOMEventTargetHelper(aWindow), mName(aName), mState(PermissionState::Denied) { KeepAliveIfHasListenersFor(NS_LITERAL_STRING("change")); }
BroadcastChannel::BroadcastChannel(nsPIDOMWindowInner* aWindow, const nsAString& aChannel) : DOMEventTargetHelper(aWindow) , mChannel(aChannel) , mState(StateActive) { // Window can be null in workers KeepAliveIfHasListenersFor(NS_LITERAL_STRING("message")); }
BroadcastChannel::BroadcastChannel(nsPIDOMWindowInner* aWindow, const PrincipalInfo& aPrincipalInfo, const nsACString& aOrigin, const nsAString& aChannel) : DOMEventTargetHelper(aWindow) , mWorkerHolder(nullptr) , mPrincipalInfo(new PrincipalInfo(aPrincipalInfo)) , mOrigin(aOrigin) , mChannel(aChannel) , mInnerID(0) , mState(StateActive) { // Window can be null in workers KeepAliveIfHasListenersFor(NS_LITERAL_STRING("message")); }