From https://bugs.webkit.org/show_bug.cgi?id=189037, we know: 1. Errors can occur in completion handler of [webView _getContentsAsStringWithCompletionHandler] because web processes are killed. So we should just keep the change of expectation in 189037. 2. webView can be destroyed before web process exits, as we receive an error WKErrorWebViewInvalidated instead of WKErrorWebContentProcessTerminated. So we need to remove "webView = nullptr;".
Created attachment 348488 [details] Patch
Comment on attachment 348488 [details] Patch Clearing flags on attachment: 348488 Committed r235509: <https://trac.webkit.org/changeset/235509>
All reviewed patches have been landed. Closing bug.
<rdar://problem/43941972>