[webkit-changes] [WebKit/WebKit] 39636b: [Observable] Use AbortSignal directly

Marais Rossouw noreply at github.com
Fri Oct 25 18:37:55 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 39636bf8cda7370d8b98b48ce85bd37263852748
      https://github.com/WebKit/WebKit/commit/39636bf8cda7370d8b98b48ce85bd37263852748
  Author: Marais Rossouw <me at marais.co>
  Date:   2024-10-25 (Fri, 25 Oct 2024)

  Changed paths:
    M Source/WebCore/SaferCPPExpectations/UncountedCallArgsCheckerExpectations
    M Source/WebCore/dom/InternalObserverFirst.cpp
    M Source/WebCore/dom/Subscriber.cpp
    M Source/WebCore/dom/Subscriber.h

  Log Message:
  -----------
  [Observable] Use AbortSignal directly
https://bugs.webkit.org/show_bug.cgi?id=282069

Reviewed by Chris Dumez.

As AbortController wraps an AbortSignal, there is no need for our
internal code to go through it as well. We save allocations, and still
entirely spec complaint. Seeing as the spec reads "to signal abort" in various
parts, which is only a concept on abort signals anyway.

* Source/WebCore/dom/InternalObserverFirst.cpp:
(WebCore::createInternalObserverOperatorFirst):
  The visitor signal should just be an AbortSignal, than through the
  AbortController bindings.
  Drive-by: Repeated Ref { m_promise } -> protectedPromise
* Source/WebCore/dom/Subscriber.cpp:
(WebCore::Subscriber::Subscriber):
  Construct a new AbortSignal, than AbortController
(WebCore::Subscriber::close):
  We need to signalAbort the AbortSignal, than abort the AbortController
* Source/WebCore/dom/Subscriber.h:

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



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


More information about the webkit-changes mailing list