[webkit-changes] [WebKit/WebKit] 1001da: Have NativePromise takes an optional LogSiteIdenti...
Jean-Yves Avenard
noreply at github.com
Fri Sep 29 23:07:02 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1001da37687abd8a91e11af93764908c35181323
https://github.com/WebKit/WebKit/commit/1001da37687abd8a91e11af93764908c35181323
Author: Jean-Yves Avenard <jya at apple.com>
Date: 2023-09-29 (Fri, 29 Sep 2023)
Changed paths:
M Source/WTF/wtf/Compiler.h
M Source/WTF/wtf/Logger.h
M Source/WTF/wtf/NativePromise.cpp
M Source/WTF/wtf/NativePromise.h
M Source/WebCore/Modules/webaudio/AsyncAudioDecoder.cpp
M Source/WebCore/Modules/webaudio/BaseAudioContext.cpp
M Source/WebKit/Platform/IPC/Connection.h
M Tools/TestWebKitAPI/Tests/IPC/ConnectionTests.cpp
M Tools/TestWebKitAPI/Tests/IPC/MessageSenderTests.cpp
M Tools/TestWebKitAPI/Tests/WTF/NativePromise.cpp
Log Message:
-----------
Have NativePromise takes an optional LogSiteIdentifier
https://bugs.webkit.org/show_bug.cgi?id=262231
rdar://116151538
Reviewed by Eric Carlson.
NativePromise and related methods now takes an optional LogSiteIdentifier
for logging purposes created by default as `LogSiteIdentifier(__builtin_FUNCTION(), nullptr)`
Ideally we would use `std::source_location::current().function_name()`
however, clang used in EWS bots do not have it, and on XCode version 15
it's also broken, acting like `__func__` which isn't particularly useful
where it's the caller's name that is of interest.
Also changing logging to the more modern WebKit style and add a LogArgument
specialisation for NativePromise. Makes for much more readable logging.
* Source/WTF/wtf/Logger.h: Make NativePromise friend.
* Source/WTF/wtf/NativePromise.cpp:
(WTF::NativePromiseBase::logChannel):
* Source/WTF/wtf/NativePromise.h:
(WTF::NativePromiseBase::log):
(WTF::invokeAsync):
(WTF::LogArgument<GenericPromise>::toString):
* Source/WebCore/Modules/webaudio/AsyncAudioDecoder.cpp:
(WebCore::AsyncAudioDecoder::decodeAsync):
* Source/WebCore/Modules/webaudio/BaseAudioContext.cpp:
(WebCore::BaseAudioContext::decodeAudioData):
* Source/WebKit/Platform/IPC/Connection.h:
(IPC::Connection::sendWithPromisedReply):
(IPC::Connection::makeAsyncReplyHandler):
* Tools/TestWebKitAPI/Tests/IPC/ConnectionTests.cpp:
(TestWebKitAPI::TEST_P):
* Tools/TestWebKitAPI/Tests/IPC/MessageSenderTests.cpp:
(TestWebKitAPI::TEST_P):
* Tools/TestWebKitAPI/Tests/WTF/NativePromise.cpp:
(TestWebKitAPI::doFailAndReject):
(TestWebKitAPI::TEST):
(TestWebKitAPI::myMethod):
(TestWebKitAPI::myMethodReturningThenCommand):
(TestWebKitAPI::myMethodReturningProducer):
Canonical link: https://commits.webkit.org/268692@main
More information about the webkit-changes
mailing list