Loading dom/cache/Cache.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -256,12 +256,14 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(Cache) NS_INTERFACE_MAP_ENTRY(nsISupports) NS_INTERFACE_MAP_END Cache::Cache(nsIGlobalObject* aGlobal, CacheChild* aActor) Cache::Cache(nsIGlobalObject* aGlobal, CacheChild* aActor, Namespace aNamespace) : mGlobal(aGlobal) , mActor(aActor) , mNamespace(aNamespace) { MOZ_DIAGNOSTIC_ASSERT(mGlobal); MOZ_DIAGNOSTIC_ASSERT(mActor); MOZ_DIAGNOSTIC_ASSERT(mNamespace != INVALID_NAMESPACE); mActor->SetListener(this); } Loading dom/cache/Cache.h +2 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ class Cache final : public nsISupports , public TypeUtils { public: Cache(nsIGlobalObject* aGlobal, CacheChild* aActor); Cache(nsIGlobalObject* aGlobal, CacheChild* aActor, Namespace aNamespace); // webidl interface methods already_AddRefed<Promise> Loading Loading @@ -109,6 +109,7 @@ private: nsCOMPtr<nsIGlobalObject> mGlobal; CacheChild* mActor; const Namespace mNamespace; public: NS_DECL_CYCLE_COLLECTING_ISUPPORTS Loading dom/cache/CacheOpChild.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -158,8 +158,8 @@ CacheOpChild::Recv__delete__(const ErrorResult& aRv, } case CacheOpResult::TStorageOpenResult: { auto actor = static_cast<CacheChild*>( aResult.get_StorageOpenResult().actorChild()); auto result = aResult.get_StorageOpenResult(); auto actor = static_cast<CacheChild*>(result.actorChild()); // If we have a success status then we should have an actor. Gracefully // reject instead of crashing, though, if we get a nullptr here. Loading @@ -176,7 +176,7 @@ CacheOpChild::Recv__delete__(const ErrorResult& aRv, CacheWorkerHolder::AllowIdleShutdownStart); actor->SetWorkerHolder(workerHolder); RefPtr<Cache> cache = new Cache(mGlobal, actor); RefPtr<Cache> cache = new Cache(mGlobal, actor, result.ns()); mPromise->MaybeResolve(cache); break; } Loading dom/cache/CacheTypes.ipdlh +2 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ include ChannelInfo; include PBackgroundSharedTypes; using HeadersGuardEnum from "mozilla/dom/FetchIPCTypes.h"; using Namespace from "mozilla/dom/cache/IPCUtils.h"; using OpenMode from "mozilla/dom/cache/IPCUtils.h"; using ReferrerPolicy from "mozilla/dom/FetchIPCTypes.h"; using RequestCredentials from "mozilla/dom/FetchIPCTypes.h"; Loading Loading @@ -212,6 +213,7 @@ struct StorageHasResult struct StorageOpenResult { nullable PCache actor; Namespace ns; }; struct StorageDeleteResult Loading dom/cache/Manager.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -1342,7 +1342,9 @@ public: Complete(Listener* aListener, ErrorResult&& aRv) override { MOZ_DIAGNOSTIC_ASSERT(aRv.Failed() || mCacheId != INVALID_CACHE_ID); aListener->OnOpComplete(Move(aRv), StorageOpenResult(), mCacheId); aListener->OnOpComplete(Move(aRv), StorageOpenResult(nullptr, nullptr, mNamespace), mCacheId); } private: Loading Loading
dom/cache/Cache.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -256,12 +256,14 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(Cache) NS_INTERFACE_MAP_ENTRY(nsISupports) NS_INTERFACE_MAP_END Cache::Cache(nsIGlobalObject* aGlobal, CacheChild* aActor) Cache::Cache(nsIGlobalObject* aGlobal, CacheChild* aActor, Namespace aNamespace) : mGlobal(aGlobal) , mActor(aActor) , mNamespace(aNamespace) { MOZ_DIAGNOSTIC_ASSERT(mGlobal); MOZ_DIAGNOSTIC_ASSERT(mActor); MOZ_DIAGNOSTIC_ASSERT(mNamespace != INVALID_NAMESPACE); mActor->SetListener(this); } Loading
dom/cache/Cache.h +2 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ class Cache final : public nsISupports , public TypeUtils { public: Cache(nsIGlobalObject* aGlobal, CacheChild* aActor); Cache(nsIGlobalObject* aGlobal, CacheChild* aActor, Namespace aNamespace); // webidl interface methods already_AddRefed<Promise> Loading Loading @@ -109,6 +109,7 @@ private: nsCOMPtr<nsIGlobalObject> mGlobal; CacheChild* mActor; const Namespace mNamespace; public: NS_DECL_CYCLE_COLLECTING_ISUPPORTS Loading
dom/cache/CacheOpChild.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -158,8 +158,8 @@ CacheOpChild::Recv__delete__(const ErrorResult& aRv, } case CacheOpResult::TStorageOpenResult: { auto actor = static_cast<CacheChild*>( aResult.get_StorageOpenResult().actorChild()); auto result = aResult.get_StorageOpenResult(); auto actor = static_cast<CacheChild*>(result.actorChild()); // If we have a success status then we should have an actor. Gracefully // reject instead of crashing, though, if we get a nullptr here. Loading @@ -176,7 +176,7 @@ CacheOpChild::Recv__delete__(const ErrorResult& aRv, CacheWorkerHolder::AllowIdleShutdownStart); actor->SetWorkerHolder(workerHolder); RefPtr<Cache> cache = new Cache(mGlobal, actor); RefPtr<Cache> cache = new Cache(mGlobal, actor, result.ns()); mPromise->MaybeResolve(cache); break; } Loading
dom/cache/CacheTypes.ipdlh +2 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ include ChannelInfo; include PBackgroundSharedTypes; using HeadersGuardEnum from "mozilla/dom/FetchIPCTypes.h"; using Namespace from "mozilla/dom/cache/IPCUtils.h"; using OpenMode from "mozilla/dom/cache/IPCUtils.h"; using ReferrerPolicy from "mozilla/dom/FetchIPCTypes.h"; using RequestCredentials from "mozilla/dom/FetchIPCTypes.h"; Loading Loading @@ -212,6 +213,7 @@ struct StorageHasResult struct StorageOpenResult { nullable PCache actor; Namespace ns; }; struct StorageDeleteResult Loading
dom/cache/Manager.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -1342,7 +1342,9 @@ public: Complete(Listener* aListener, ErrorResult&& aRv) override { MOZ_DIAGNOSTIC_ASSERT(aRv.Failed() || mCacheId != INVALID_CACHE_ID); aListener->OnOpComplete(Move(aRv), StorageOpenResult(), mCacheId); aListener->OnOpComplete(Move(aRv), StorageOpenResult(nullptr, nullptr, mNamespace), mCacheId); } private: Loading