RESOLVED FIXED 191996
WebKit.AddAndRemoveDataDetectors hits a debug assertion after r238515
https://bugs.webkit.org/show_bug.cgi?id=191996
Summary WebKit.AddAndRemoveDataDetectors hits a debug assertion after r238515
Wenson Hsieh
Reported 2018-11-26 21:47:59 PST
From logging in decode(Decoder& decoder, NSArray<Class> *allowedClasses), it looks like what's happening is that the allowedClasses contains: @[ NSArray.class, DDScannerResult.class ] ...however, the decoded object is a type of __NSArrayM, which is not exactly equal to NSArray.class (instead, it's one of the concrete implementations of NSArray). Example crash trace (from https://build.webkit.org/builders/Apple%20iOS%2012%20Simulator%20Debug%20WK2%20%28Tests%29/builds/1014/steps/run-api-tests/logs/stdio) TestWebKitAPI.WebKit.AddAndRemoveDataDetectors ASSERTION FAILED: [allowedClasses containsObject:[object class]] /Volumes/Data/slave/ios-simulator-12-debug/build/Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.h(57) : std::optional<RetainPtr<T> > IPC::decode(IPC::Decoder &, NSArray<Class> *) [T = NSArray] 1 0x106fbd359 WTFCrash 2 0x10ab7975b WTFCrashWithInfo(int, char const*, char const*, int) 3 0x10af506d4 std::optional<WTF::RetainPtr<NSArray> > IPC::decode<NSArray>(IPC::Decoder&, NSArray<objc_class*>*) 4 0x10af5038b WebKit::DataDetectionResult::decode(IPC::Decoder&) 5 0x10bb8556c std::optional<WebKit::DataDetectionResult> IPC::ArgumentCoder<WebKit::DataDetectionResult>::decode<WebKit::DataDetectionResult, (void*)0>(IPC::Decoder&) 6 0x10bb65f54 IPC::Decoder& IPC::Decoder::operator>><WebKit::DataDetectionResult, (void*)0>(std::optional<WebKit::DataDetectionResult>&) 7 0x10bb65e59 Messages::WebPage::DetectDataInAllFrames::callReply(IPC::Decoder&, WTF::CompletionHandler<void (WebKit::DataDetectionResult&&)>&&)
Attachments
Patch (2.38 KB, patch)
2018-11-26 21:55 PST, Wenson Hsieh
thorton: review+
commit-queue: commit-queue-
Rebase on trunk (2.36 KB, patch)
2018-11-27 07:12 PST, Wenson Hsieh
no flags
Wenson Hsieh
Comment 1 2018-11-26 21:55:45 PST
WebKit Commit Bot
Comment 2 2018-11-26 23:48:32 PST Comment hidden (obsolete)
Wenson Hsieh
Comment 3 2018-11-27 07:12:39 PST
Created attachment 355731 [details] Rebase on trunk
WebKit Commit Bot
Comment 4 2018-11-27 07:51:49 PST
Comment on attachment 355731 [details] Rebase on trunk Clearing flags on attachment: 355731 Committed r238553: <https://trac.webkit.org/changeset/238553>
Radar WebKit Bug Importer
Comment 5 2018-11-27 08:04:30 PST
Note You need to log in before you can comment on or make changes to this bug.