UI process sometimes crashes under _takeViewSnapshot when the window is off-screen
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Apr 2015 23:19:00 +0000 (23:19 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Apr 2015 23:19:00 +0000 (23:19 +0000)
commit756dd9e0823da50cb42c39283c1da15f9f23a799
treef11d1847d094f00d85632a19875303a30564a10a
parent671f8e54f18a5d092700a80321b248f4a1f9d2a5
UI process sometimes crashes under _takeViewSnapshot when the window is off-screen
https://bugs.webkit.org/show_bug.cgi?id=144418
<rdar://problem/20740278>

Reviewed by Alexey Proskuryakov.

* UIProcess/API/mac/WKView.mm:
(-[WKView _takeViewSnapshot]):
Null-check the array before checking if it has any items.
If the window is off-screen, we can't snapshot it.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183588 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/mac/WKView.mm