Bug 1744025: Use CheckedUnsafePtr<WorkerPrivate> in WorkerEventTarget. r=dom-worker-reviewers,edenchuang

Depends on D132799

Differential Revision: https://phabricator.services.mozilla.com/D132800
This commit is contained in:
Jens Stutte 2022-01-25 08:53:02 +00:00
parent b7adbf2325
commit dcae57ea85

View File

@ -9,12 +9,11 @@
#include "nsISerialEventTarget.h" #include "nsISerialEventTarget.h"
#include "mozilla/Mutex.h" #include "mozilla/Mutex.h"
#include "mozilla/dom/WorkerPrivate.h"
namespace mozilla { namespace mozilla {
namespace dom { namespace dom {
class WorkerPrivate;
class WorkerEventTarget final : public nsISerialEventTarget { class WorkerEventTarget final : public nsISerialEventTarget {
public: public:
// The WorkerEventTarget supports different dispatch behaviors: // The WorkerEventTarget supports different dispatch behaviors:
@ -30,7 +29,7 @@ class WorkerEventTarget final : public nsISerialEventTarget {
private: private:
mozilla::Mutex mMutex; mozilla::Mutex mMutex;
WorkerPrivate* mWorkerPrivate; CheckedUnsafePtr<WorkerPrivate> mWorkerPrivate;
const Behavior mBehavior; const Behavior mBehavior;
~WorkerEventTarget() = default; ~WorkerEventTarget() = default;