Issue #2402 - Don't call WorkerPrivate::WorkerName() to get service worker scope. https://bugzilla.mozilla.org/show_bug.cgi?id=1350433

This commit is contained in:
Brian Smith 2024-01-07 07:34:05 -06:00 committed by roytam1
commit 5202c08cfb
5 changed files with 14 additions and 7 deletions

View file

@ -535,6 +535,13 @@ public:
return mLoadInfo.mServiceWorkerID;
}
const nsCString&
ServiceWorkerScope() const
{
MOZ_DIAGNOSTIC_ASSERT(IsServiceWorker());
return mWorkerName;
}
nsIURI*
GetBaseURI() const
{
@ -831,7 +838,7 @@ public:
const nsCString&
WorkerName() const
{
MOZ_ASSERT(IsServiceWorker() || IsSharedWorker());
MOZ_ASSERT(IsSharedWorker());
return mWorkerName;
}