Safari optimized flow should be releasing viewer to prevent memory growth with subseq...
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 May 2018 11:30:04 +0000 (11:30 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 May 2018 11:30:04 +0000 (11:30 +0000)
commit978926eb8da032b2c2aacebe65a87879c0fcf2bb
treeb2e0b59a1e16b8ef99893824d297033623e1a1c3
parent6d47f6240eac4b0782586ce4f7cdf3f55fde0987
Safari optimized flow should be releasing viewer to prevent memory growth with subsequent launches/closes
https://bugs.webkit.org/show_bug.cgi?id=185722
<rdar://problem/40247351>

Reviewed by Antoine Quint.

I made a rookie mistake in the original patch: I was holding a strong
reference to "self" in a block, which was causing a retain cycle.
Replace that with a WeakObjCPtr.

* UIProcess/Cocoa/SystemPreviewControllerCocoa.mm:
(-[_WKPreviewControllerDataSource previewController:previewItemAtIndex:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231893 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/Cocoa/SystemPreviewControllerCocoa.mm