[webkit-changes] [WebKit/WebKit] db0adb: Fix null pointer crash in WorkerScriptLoader::canc...
youennf
noreply at github.com
Mon Jun 12 08:58:20 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: db0adb3f5ce1472cd25c86d7899d4d79f0925851
https://github.com/WebKit/WebKit/commit/db0adb3f5ce1472cd25c86d7899d4d79f0925851
Author: Youenn Fablet <youennf at gmail.com>
Date: 2023-06-12 (Mon, 12 Jun 2023)
Changed paths:
A LayoutTests/http/wpt/service-workers/service-worker-pending-job-cancel-expected.txt
A LayoutTests/http/wpt/service-workers/service-worker-pending-job-cancel-worker.js
A LayoutTests/http/wpt/service-workers/service-worker-pending-job-cancel.html
M Source/WebCore/workers/service/ServiceWorkerJob.cpp
Log Message:
-----------
Fix null pointer crash in WorkerScriptLoader::cancel()
https://bugs.webkit.org/show_bug.cgi?id=257955
rdar://110643539
Reviewed by David Kilzer.
Make sure to use the local variable loader instead of m_scriptLoader which is nullified just before.
Switch to std::exchange since it is more semantically correct.
* LayoutTests/http/wpt/service-workers/service-worker-pending-job-cancel-expected.txt: Added.
* LayoutTests/http/wpt/service-workers/service-worker-pending-job-cancel-worker.js: Added.
* LayoutTests/http/wpt/service-workers/service-worker-pending-job-cancel.html: Added.
* Source/WebCore/workers/service/ServiceWorkerJob.cpp:
(WebCore::ServiceWorkerJob::notifyFinished):
(WebCore::ServiceWorkerJob::cancelPendingLoad):
Canonical link: https://commits.webkit.org/265070@main
More information about the webkit-changes
mailing list