[webkit-reviews] review granted: [Bug 196839] UI↔Web deadlock when printing with a JavaScript alert visible : [Attachment 367265] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 11 17:44:12 PDT 2019


Andy Estes <aestes at apple.com> has granted Tim Horton <thorton at apple.com>'s
request for review:
Bug 196839: UI↔Web deadlock when printing with a JavaScript alert visible
https://bugs.webkit.org/show_bug.cgi?id=196839

Attachment 367265: Patch

https://bugs.webkit.org/attachment.cgi?id=367265&action=review




--- Comment #3 from Andy Estes <aestes at apple.com> ---
Comment on attachment 367265
  --> https://bugs.webkit.org/attachment.cgi?id=367265
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=367265&action=review

This is all SPI and the only caller of _webViewPrintFormatter doesn't cache the
return value, so I think this is ok as-is, but I do think the design of
-_webViewPrintFormatter is weird.

> Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:6318
> +    if
(_page->process().connection()->hasOutstandingOutgoingSynchronousReplies())
> +	   return nil;

What if a client happens to call this while there are outstanding synchronous
replies but doesn't plan to start printing until later?

What about always returning a _WKWebViewPrintFormatter but giving it a new
boolean property that clients can check?


More information about the webkit-reviews mailing list