isValidCSSSelector is unsafe to be called from a non-main thread
Created attachment 347113 [details] Patch
<rdar://problem/40517358>
Created attachment 347116 [details] Patch
Comment on attachment 347116 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=347116&action=review > Source/WebCore/contentextensions/ContentExtensionRule.h:207 > +// FIXME: Move this to WTF. Can we do this now?
Created attachment 347121 [details] Patch
Created attachment 347124 [details] Patch
http://trac.webkit.org/r234873
Looks like https://trac.webkit.org/changeset/234873/webkit Has caused 7 crashes on Debug wk2 builds. Build Log: https://build.webkit.org/results/Apple%20Sierra%20Debug%20WK2%20(Tests)/r234882%20(7631)/results.html Crash: https://build.webkit.org/results/Apple%20Sierra%20Debug%20WK2%20(Tests)/r234882%20(7631)/inspector/worker/debugger-scripts-crash-log.txt Looks like a new assertion is causing this.
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 com.apple.JavaScriptCore 0x0000000129e7e4c0 WTFCrash + 16 (Assertions.cpp:267) 1 com.apple.WebKit 0x000000010fa2705b WTFCrashWithInfo(int, char const*, char const*, int) + 27 2 com.apple.WebKit 0x000000010feb2580 WebKit::NetworkConnectionToWebProcess::addNetworkLoadInformationMetrics(unsigned long long, WebCore::NetworkLoadMetrics const&) + 128 (NetworkConnectionToWebProcess.h:108) 3 com.apple.WebKit 0x000000010feb2053 WebKit::NetworkResourceLoader::didFinishLoading(WebCore::NetworkLoadMetrics const&) + 435 (NetworkResourceLoader.cpp:527) 4 com.apple.WebKit 0x000000010fe0e04c WebKit::NetworkLoad::didCompleteWithError(WebCore::ResourceError const&, WebCore::NetworkLoadMetrics const&) + 300 (NetworkLoad.cpp:372) 5 com.apple.WebKit 0x000000010fe04e07 WebKit::NetworkDataTaskCocoa::didCompleteWithError(WebCore::ResourceError const&, WebCore::NetworkLoadMetrics const&) + 87 (NetworkDataTaskCocoa.mm:302) 6 com.apple.WebKit 0x000000010fef6b53 -[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:] + 227 (NetworkSessionCocoa.mm:402) 7 com.apple.CFNetwork 0x00007fffbb8655c1 __51-[NSURLSession delegate_task:didCompleteWithError:]_block_invoke.162 + 76 8 com.apple.Foundation 0x00007fffbdf81f19 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 7 9 com.apple.Foundation 0x00007fffbdf81bfc -[NSBlockOperation main] + 101 10 com.apple.Foundation 0x00007fffbdf80324 -[__NSOperationInternal _start:] + 672 11 com.apple.Foundation 0x00007fffbdf7c1db __NSOQSchedule_f + 201 12 libdispatch.dylib 0x00007fffd20c38fc _dispatch_client_callout + 8 13 libdispatch.dylib 0x00007fffd20d0aac _dispatch_main_queue_callback_4CF + 925 14 com.apple.CoreFoundation 0x00007fffbc56ed69 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9 15 com.apple.CoreFoundation 0x00007fffbc53004d __CFRunLoopRun + 2221 16 com.apple.CoreFoundation 0x00007fffbc52f544 CFRunLoopRunSpecific + 420 17 com.apple.Foundation 0x00007fffbdf60252 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 277 18 com.apple.Foundation 0x00007fffbdf6012a -[NSRunLoop(NSRunLoop) run] + 76 19 libxpc.dylib 0x00007fffd235289b _xpc_objc_main + 731 20 libxpc.dylib 0x00007fffd23512e4 xpc_main + 494 21 com.apple.WebKit.Networking 0x000000010fa0f091 WebKit::XPCServiceMain() + 1169 22 com.apple.WebKit.Networking 0x000000010fa0f37b main + 27 23 libdyld.dylib 0x00007fffd20f9235 start + 1
http://trac.webkit.org/r234890
I'm re-adding the assertion with the Vector fix in https://bugs.webkit.org/show_bug.cgi?id=188611