[Webkit-unassigned] [Bug 161450] No reliable way to get a snapshot of WKWebView (macOS)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Nov 7 01:06:26 PST 2016


--- Comment #33 from Dan Saunders <dasau at microsoft.com> ---
(In reply to comment #32)
> Dan, I’m not sure what you are referring to when you cite “hardware race
> conditions”. What Michael is talking about is a race between the WebKit page
> loading process and the snapshot. And it affects the iOS API too.

Sorry for using confusing wording. Michael mentioned that the race condition may not repro on all hardware. I tried a few hundred navigations on my two Mac machines, and never ran into an issue with an incomplete snapshot due to race condition as long as I waited for (- (void)webView:(WKWebView *)webView didFinishNavigation:(null_unspecified WKNavigation *)navigation) delegate. The only time I could get a blank snapshot after initial page load is when I start to navigate to a new page, and the new page has not called didFinishNavigation yet. The caller can be aware of this condition though, it is not guaranteed that the snapshot will be available until navigation is finished and they get the notification. The performance on the API is not bad for Mac, in most cases it takes 10-20 milliseconds for me to retrieve the async snapshot. If I call the API immediately after navigation finishes on a complex page, it could take 1 second although this seems likely due to the web content process

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20161107/c8aa6ec1/attachment.html>

More information about the webkit-unassigned mailing list