Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4cc06b4be14a60c0b72098fa3e32ccb98657d525
      
https://github.com/WebKit/WebKit/commit/4cc06b4be14a60c0b72098fa3e32ccb98657d525
  Author: Jean-Yves Avenard <[email protected]>
  Date:   2023-09-05 (Tue, 05 Sep 2023)

  Changed paths:
    M Source/WTF/wtf/FunctionDispatcher.h
    M Source/WTF/wtf/SuspendableWorkQueue.cpp
    M Source/WTF/wtf/SuspendableWorkQueue.h
    M Source/WTF/wtf/WorkQueue.cpp
    M Source/WTF/wtf/WorkQueue.h
    M Source/WTF/wtf/cocoa/WorkQueueCocoa.cpp
    M Source/WTF/wtf/generic/WorkQueueGeneric.cpp

  Log Message:
  -----------
  WorkQueue should inherit from SerialFunctionDispatcher
https://bugs.webkit.org/show_bug.cgi?id=260779
rdar://114535523

Reviewed by Kimmo Kinnunen.

Make WorkQueue inherit from SerialFunctionDispatcher so that it can be
used similarly to RunLoop and WorkerOrWorkletThread.

Needed for this change to compile:
- Export the whole class to get the multiple inheritance to
  work across binaries.
- When exporting WorkQueue, it will export function with 
OSObjectPtr<dispatch_queue_t>.
  This has different type in Obj-C and in C++. If the type is used in both,
  then there will be unresolved symbol since C++ type is used when creating
  the library (WorkQueue.cpp), as such remove method prototype from WorkQueue
  and have a single WorkQueue constructor taking an enum instead.

Ideally, we would implement only bug 261080, but there are futher issues
getting it done. So to not block other works depending on this change,
we push this version first.

* Source/WTF/wtf/FunctionDispatcher.h:
* Source/WTF/wtf/SuspendableWorkQueue.cpp:
(WTF::SuspendableWorkQueue::stateString):
* Source/WTF/wtf/SuspendableWorkQueue.h:
* Source/WTF/wtf/WorkQueue.cpp:
(WTF::WorkQueue::main):
(WTF::WorkQueue::dispatch):
(WTF::WorkQueue::assertIsCurrent const):
(WTF::ConcurrentWorkQueue::dispatch):
* Source/WTF/wtf/WorkQueue.h:
(WTF::WTF_ASSERTS_ACQUIRED_CAPABILITY): Deleted.
* Source/WTF/wtf/cocoa/WorkQueueCocoa.cpp:
(WTF::WorkQueue::WorkQueue):
(WTF::WorkQueue::constructMainWorkQueue): Deleted.
* Source/WTF/wtf/generic/WorkQueueGeneric.cpp:
(WTF::WorkQueue::WorkQueue):
(WTF::WorkQueue::constructMainWorkQueue): Deleted.

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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to