Bug 1757188 - Ensure workerPrivate is not null, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D139713
This commit is contained in:
@@ -1985,7 +1985,11 @@ already_AddRefed<EventSource> EventSource::Constructor(
|
||||
} else {
|
||||
// Worker side.
|
||||
WorkerPrivate* workerPrivate = GetCurrentThreadWorkerPrivate();
|
||||
MOZ_ASSERT(workerPrivate);
|
||||
if (!workerPrivate) {
|
||||
aRv.Throw(NS_ERROR_FAILURE);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
cookieJarSettings = workerPrivate->CookieJarSettings();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user