diff --git a/dom/events/DOMEventTargetHelper.h b/dom/events/DOMEventTargetHelper.h index f41eb5771301..7978f926ff38 100644 --- a/dom/events/DOMEventTargetHelper.h +++ b/dom/events/DOMEventTargetHelper.h @@ -43,6 +43,13 @@ public: { BindToOwner(aWindow); } + explicit DOMEventTargetHelper(nsIGlobalObject* aGlobalObject) + : mParentObject(nullptr) + , mOwnerWindow(nullptr) + , mHasOrHasHadOwnerWindow(false) + { + BindToOwner(aGlobalObject); + } explicit DOMEventTargetHelper(DOMEventTargetHelper* aOther) : mParentObject(nullptr) , mOwnerWindow(nullptr) diff --git a/dom/workers/DataStore.cpp b/dom/workers/DataStore.cpp index adb5814f38ad..f611402293af 100644 --- a/dom/workers/DataStore.cpp +++ b/dom/workers/DataStore.cpp @@ -29,7 +29,7 @@ NS_INTERFACE_MAP_BEGIN(WorkerDataStore) NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) WorkerDataStore::WorkerDataStore(WorkerGlobalScope* aScope) - : DOMEventTargetHelper(aScope) + : DOMEventTargetHelper(static_cast(aScope)) {} already_AddRefed