RESOLVED FIXED 217565
IPC testing JS API should expose a reply and describe the list of arguments for each message
https://bugs.webkit.org/show_bug.cgi?id=217565
Summary IPC testing JS API should expose a reply and describe the list of arguments f...
Ryosuke Niwa
Reported 2020-10-10 21:28:07 PDT
JS API added in https://trac.webkit.org/r268239 to test IPC should wait & decode the reply and expose it as JS objects. We should also describe the list of arguments for each IPC message.
Attachments
WIP (48.74 KB, patch)
2020-10-10 21:29 PDT, Ryosuke Niwa
ews-feeder: commit-queue-
WIP2 (52.49 KB, patch)
2020-10-12 00:22 PDT, Ryosuke Niwa
no flags
Patch (66.96 KB, patch)
2020-10-13 13:09 PDT, Ryosuke Niwa
no flags
Patch (68.03 KB, patch)
2020-10-13 14:00 PDT, Ryosuke Niwa
no flags
Ryosuke Niwa
Comment 1 2020-10-10 21:29:46 PDT
Ryosuke Niwa
Comment 2 2020-10-12 00:22:52 PDT
Ryosuke Niwa
Comment 3 2020-10-13 13:09:32 PDT
Geoffrey Garen
Comment 4 2020-10-13 13:16:15 PDT
Comment on attachment 411242 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=411242&action=review r=me > Source/WebKit/WebProcess/WebPage/IPCTestingAPI.cpp:151 > + { "sessionID", sessionID, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, > + { "pageIdentifier", pageIdentifier, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, How about naming these sessionID and pageID, to keep our JavaScript code consistent.
Ryosuke Niwa
Comment 5 2020-10-13 13:32:04 PDT
Comment on attachment 411242 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=411242&action=review >> Source/WebKit/WebProcess/WebPage/IPCTestingAPI.cpp:151 >> + { "pageIdentifier", pageIdentifier, 0, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, > > How about naming these sessionID and pageID, to keep our JavaScript code consistent. I guess we'd also rename frameIdentifier to frameID in that case. > Source/WebKit/WebProcess/WebPage/IPCTestingAPI.cpp:564 > + returnValue = JSObjectMakeDeferredPromise(context, &resolve, &reject, exception); Hm... Mojave complains that I'm using this even though I have a local build of WebKit.
Geoffrey Garen
Comment 6 2020-10-13 13:33:32 PDT
EWS is angry: CompileC /Volumes/Data/worker/macOS-Mojave-Debug-Build-EWS/build/WebKitBuild/WebKit.build/Debug/WebKit.build/Objects-normal/x86_64/UnifiedSource76.o /Volumes/Data/worker/macOS-Mojave-Debug-Build-EWS/build/WebKitBuild/Debug/DerivedSources/WebKit2/unified-sources/Unifi edSource76.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler cd /Volumes/Data/worker/macOS-Mojave-Debug-Build-EWS/build/Source/WebKit export LANG=en_US.US-ASCII /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu++1z -stdlib=libc++ -gmodules -Wno-trigraphs -fno-exceptions -fno-rtti -fno-sanitize=vptr -fpascal-strings -O0 -fno-common -Werror -Wno-missing-field-initializers -Wmissing-prototypes -Wunreachable-code -Wnon-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wsign-compare -Wno-shorten-64-to-32 -Wnewline-eof -Wno-c++11-extensions -DENABLE_EXPERIMENTAL_FEATURES -DHAVE_CORE_PREDICTION -DFRAMEWORK_NAME=WebKit -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -mmacosx-version-min=10.14 -g -fvisibility=hidden -fvisibility-inlines-hidden -fno-threadsafe-statics -Wno-sign-conversion -Winfinite-recursion -Wmove -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wrange-loop-analysis -Wno-semicolon-before-method-body -iquote /Volumes/Data/worker/macOS-Mojave-Debug-Build-EWS/build/WebKitBuild/WebKit.build/Debug/WebKit.build/WebKit-generated-files.hmap -I/Volumes/Data/worker/macOS-Mojave-Debug-Build-EWS/build/WebKitBuild/WebKit.build/Debug/WebKit.build/WebKit-own-target-headers.hmap -I/Volumes/Data/worker/macOS-Mojave-Debug-Build-EWS/build/WebKitBuild/WebKit.build/Debug/WebKit.build/WebKit-all-target-headers.hmap -iquote /Volumes/Data/worker/macOS-Mojave-Debug-Build-EWS/build/WebKitBuild/WebKit.build/Debug/WebKit.build/WebKit-project-headers.hmap -I/Volumes/Data/worker/macOS-Mojave-Debug-Build-EWS/build/WebKitBuild/Debug/include -I/Volumes/Data/worker/macOS-Mojave-Debug-Build-EWS/build/WebKitBuild/Debug/usr/local/include -I/Volumes/Data/worker/macOS-Mojave-Debug-Build-EWS/build/WebKitBuild/Debug/WebCore.framework/PrivateHeaders/ForwardingHeaders -I/Volumes/Data/worker/macOS-Mojave-Debug-Build-EWS/build/WebKitBuild/Debug/DerivedSources/WebKit2 -I/Volumes/Data/worker/macOS-Mojave-Debug-Build-EWS/build/WebKitBuild/Debug/usr/local/include/WebKitAdditions -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/local/include/WebKitAdditions -I/Volumes/Data/worker/macOS-Mojave-Debug-Build-EWS/build/WebKitBuild/Debug/usr/local/include/webrtc -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/local/include/webrtc -I/Volumes/Data/worker/macOS-Mojave-Debug-Build-EWS/build/Source/WebKit -I/Volumes/Data/worker/macOS-Mojave-Debug-Build-EWS/build/WebKitBuild/WebKit.build/Debug/WebKit.build/DerivedSources-normal/x86_64 -I/Volumes/Data/worker/macOS-Mojave-Debug-Build-EWS/build/WebKitBuild/WebKit.build/Debug/WebKit.build/DerivedSources/x86_64 -I/Volumes/Data/worker/macOS-Mojave-Debug-Build-EWS/build/WebKitBuild/WebKit.build/Debug/WebKit.build/DerivedSources -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wconditional-uninitialized -Wextra-tokens -Wformat-security -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wno-unused-parameter -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough -Wvla -Wliteral-conversion -F/Volumes/Data/worker/macOS-Mojave-Debug-Build-EWS/build/WebKitBuild/Debug -F/Volumes/Data/worker/macOS-Mojave-Debug-Build-EWS/build/Source/WebKit/../../WebKitLibraries/WebKitPrivateFrameworkStubs/Mac/10140 0 -iframework /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/PrivateFrameworks -iframework /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks -iframework /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/PrivateFrameworks -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/System.framework/PrivateHeaders -include /Volumes/Data/worker/macOS-Mojave-Debug-Build-EWS/build/WebKitBuild/PrecompiledHeaders/WebKit2Prefix-awuiitavrzgbhueqydpoigkowpiq/WebKit2Prefix.h -MMD -MT dependencies -MF /Volumes/Data/worker/macOS-Mojave-Debug-Build-EWS/build/WebKitBuild/WebKit.build/Debug/WebKit.build/Objects-normal/x86_64/UnifiedSource76.d --serialize-diagnostics /Volumes/Data/worker/macOS-Mojave-Debug-Build-EWS/build/WebKitBuild/WebKit.build/Debug/WebKit.build/Objects-normal/x86_64/UnifiedSource76.dia -c /Volumes/Data/worker/macOS-Mojave-Debug-Build-EWS/build/WebKitBuild/Debug/DerivedSources/WebKit2/unified-sources/UnifiedSource76.cpp -o /Volumes/Data/worker/macOS-Mojave-Debug-Build-EWS/build/WebKitBuild/WebKit.build/Debug/WebKit.build/Objects-normal/x86_64/UnifiedSource76.o In file included from /Volumes/Data/worker/macOS-Mojave-Debug-Build-EWS/build/WebKitBuild/Debug/DerivedSources/WebKit2/unified-sources/UnifiedSource76.cpp:5: /Volumes/Data/worker/macOS-Mojave-Debug-Build-EWS/build/Source/WebKit/WebProcess/WebPage/IPCTestingAPI.cpp:564:23: error: 'JSObjectMakeDeferredPromise' is only available on macOS 10.15 or newer [-Werror,-Wunguarded-availability-new]
Ryosuke Niwa
Comment 7 2020-10-13 13:39:13 PDT
Yeah, how do we suppress that warning in Mojave? It's totally irrelevant that JSC that shipped in Mojave doesn't have that API...
Ryosuke Niwa
Comment 8 2020-10-13 13:41:26 PDT
(In reply to Ryosuke Niwa from comment #7) > Yeah, how do we suppress that warning in Mojave? It's totally irrelevant > that JSC that shipped in Mojave doesn't have that API... Found it: ALLOW_NEW_API_WITHOUT_GUARDS_BEGIN
Ryosuke Niwa
Comment 9 2020-10-13 14:00:49 PDT
Ryosuke Niwa
Comment 10 2020-10-13 14:17:02 PDT
Comment on attachment 411251 [details] Patch This was already reviewed by Geoff. Just waiting for EWS.
Ryosuke Niwa
Comment 11 2020-10-13 16:20:56 PDT
Radar WebKit Bug Importer
Comment 12 2020-10-13 16:21:17 PDT
Fujii Hironori
Comment 13 2020-10-13 17:17:24 PDT
Filed: Bug 217688 – [WinCaio][PlayStation] reference to undefined symbol `IPC::messageReplyArgumentDescriptions(IPC::MessageName)' since r268431
Ryosuke Niwa
Comment 14 2020-10-13 20:20:45 PDT
WebKit Commit Bot
Comment 15 2020-10-14 13:41:06 PDT
Re-opened since this is blocked by bug 217728
Fujii Hironori
Comment 16 2020-10-14 14:05:02 PDT
*** Bug 217688 has been marked as a duplicate of this bug. ***
Ryosuke Niwa
Comment 17 2020-10-14 17:33:32 PDT
Ryosuke Niwa
Comment 18 2020-10-14 18:44:06 PDT
Note You need to log in before you can comment on or make changes to this bug.