Branch: refs/heads/webkitglib/2.52
  Home:   https://github.com/WebKit/WebKit
  Commit: fbf4086d38d89e42373ec72367e4678daa8049f2
      
https://github.com/WebKit/WebKit/commit/fbf4086d38d89e42373ec72367e4678daa8049f2
  Author: Vitaly Dyachkov <[email protected]>
  Date:   2026-01-27 (Tue, 27 Jan 2026)

  Changed paths:
    M Source/WebCore/Modules/web-locks/WebLockManager.cpp
    M Source/WebCore/bindings/js/JSDOMPromise.cpp

  Log Message:
  -----------
  Cherry-pick 306190@main (65057afee9f4). 
https://bugs.webkit.org/show_bug.cgi?id=305762

    Fix crash in `DOMPromise::whenPromiseIsSettled` during worker termination
    https://bugs.webkit.org/show_bug.cgi?id=305762

    Reviewed by Youenn Fablet.

    `DOMPromise::whenPromiseIsSettled()` could crash when called during
    worker shutdown due to two issues:

    1. The `waitingPromise` in `WebLockManager::didCompleteLockRequest()`
       could be suspended during worker termination, leading to invalid
       access when the promise settled handler was invoked.

    2. `JSBoundFunction::create()` can return `nullptr` in some cases, but
       the result was passed directly to `performPromiseThen()` without
       validation.

    This patch adds necessary checks to prevent crashes in these scenarios.

    * Source/WebCore/Modules/web-locks/WebLockManager.cpp:
    (WebCore::WebLockManager::didCompleteLockRequest):
    * Source/WebCore/bindings/js/JSDOMPromise.cpp:
    (WebCore::DOMPromise::whenPromiseIsSettled):

    Canonical link: https://commits.webkit.org/306190@main

Canonical link: https://commits.webkit.org/305877.22@webkitglib/2.52



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to