mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 08:18:41 +09:00
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:
parent
6979441734
commit
5202c08cfb
5 changed files with 14 additions and 7 deletions
|
|
@ -598,7 +598,7 @@ private:
|
|||
innerID = NS_LITERAL_STRING("ServiceWorker");
|
||||
// Use scope as ID so the webconsole can decide if the message should
|
||||
// show up per tab
|
||||
id.AssignWithConversion(mWorkerPrivate->WorkerName());
|
||||
id.AssignWithConversion(mWorkerPrivate->ServiceWorkerScope());
|
||||
} else {
|
||||
innerID = NS_LITERAL_STRING("Worker");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -710,7 +710,7 @@ WorkerFetchResolver::FlushConsoleReport()
|
|||
return;
|
||||
}
|
||||
|
||||
swm->FlushReportsToAllClients(worker->WorkerName(), mReporter);
|
||||
swm->FlushReportsToAllClients(worker->ServiceWorkerScope(), mReporter);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -805,7 +805,7 @@ public:
|
|||
|
||||
WaitUntilHandler(WorkerPrivate* aWorkerPrivate, JSContext* aCx)
|
||||
: mWorkerPrivate(aWorkerPrivate)
|
||||
, mScope(mWorkerPrivate->WorkerName())
|
||||
, mScope(mWorkerPrivate->ServiceWorkerScope())
|
||||
, mLine(0)
|
||||
, mColumn(0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -550,7 +550,7 @@ private:
|
|||
RefPtr<ServiceWorkerManager> swm = ServiceWorkerManager::GetInstance();
|
||||
if (swm) {
|
||||
swm->HandleError(aCx, aWorkerPrivate->GetPrincipal(),
|
||||
aWorkerPrivate->WorkerName(),
|
||||
aWorkerPrivate->ServiceWorkerScope(),
|
||||
aWorkerPrivate->ScriptURL(),
|
||||
EmptyString(), EmptyString(), EmptyString(),
|
||||
0, 0, JSREPORT_ERROR, JSEXN_ERR);
|
||||
|
|
@ -1255,7 +1255,7 @@ private:
|
|||
RefPtr<ServiceWorkerManager> swm = ServiceWorkerManager::GetInstance();
|
||||
if (swm) {
|
||||
swm->HandleError(aCx, aWorkerPrivate->GetPrincipal(),
|
||||
aWorkerPrivate->WorkerName(),
|
||||
aWorkerPrivate->ServiceWorkerScope(),
|
||||
aWorkerPrivate->ScriptURL(),
|
||||
mReport.mMessage,
|
||||
mReport.mFilename, mReport.mLine, mReport.mLineNumber,
|
||||
|
|
@ -6727,7 +6727,7 @@ WorkerPrivate::GetOrCreateGlobalScope(JSContext* aCx)
|
|||
if (IsSharedWorker()) {
|
||||
globalScope = new SharedWorkerGlobalScope(this, WorkerName());
|
||||
} else if (IsServiceWorker()) {
|
||||
globalScope = new ServiceWorkerGlobalScope(this, WorkerName());
|
||||
globalScope = new ServiceWorkerGlobalScope(this, ServiceWorkerScope());
|
||||
} else {
|
||||
globalScope = new DedicatedWorkerGlobalScope(this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue