[Webkit-unassigned] [Bug 159980] [iOS] Apps using WKWebView will crash if they set the scroll view's delegate and don't nil it out later
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jul 21 14:56:05 PDT 2016
https://bugs.webkit.org/show_bug.cgi?id=159980
--- Comment #7 from Chelsea Pugh <cpugh at apple.com> ---
(In reply to comment #6)
> Comment on attachment 284260 [details]
> v2 patch for [iOS] Apps using WKWebView will crash
>
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=284260&action=review
>
> > Source/WebKit2/UIProcess/ios/WKScrollView.mm:47
> > + WebKit::WeakObjCPtr<id <UIScrollViewDelegate>> _externalDelegate;
>
> I think you can add âusing namespace WebKitâ to this file and avoid the
> WebKit:: qualifier here and elsewhere.
Will do
>
> > Source/WebKit2/UIProcess/ios/WKScrollView.mm:74
> > + auto externalDelegate = _externalDelegate.get();
> > + return [super respondsToSelector:aSelector] || [_internalDelegate respondsToSelector:aSelector] || [externalDelegate.get() respondsToSelector:aSelector];
>
> Since youâre only using the external delegate once you donât really have to
> have this local.
Okay
>
> > Source/WebKit2/UIProcess/ios/WKScrollView.mm:140
> > + if (_externalDelegate.get().get() == delegate)
>
> Yikes! I wonder if we should add a == override to WeakObjCPtr.
Maybe, but likely out of scope for this patch
--
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/20160721/6e088735/attachment.html>
More information about the webkit-unassigned
mailing list