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.
Created attachment 411029 [details] WIP
Created attachment 411099 [details] WIP2
Created attachment 411242 [details] Patch
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.
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.
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]
Yeah, how do we suppress that warning in Mojave? It's totally irrelevant that JSC that shipped in Mojave doesn't have that API...
(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
Created attachment 411251 [details] Patch
Comment on attachment 411251 [details] Patch This was already reviewed by Geoff. Just waiting for EWS.
Committed r268431: <https://trac.webkit.org/changeset/268431>
<rdar://problem/70271211>
Filed: Bug 217688 – [WinCaio][PlayStation] reference to undefined symbol `IPC::messageReplyArgumentDescriptions(IPC::MessageName)' since r268431
Committed r268443: <https://trac.webkit.org/changeset/268443>
Re-opened since this is blocked by bug 217728
*** Bug 217688 has been marked as a duplicate of this bug. ***
Committed r268503: <https://trac.webkit.org/changeset/268503>
Build fix: https://trac.webkit.org/r268504