Bug 173083

Summary: Crash inside WebKit::PluginView::getAuthenticationInfo
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: WebKit2Assignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, andersca, cdumez, commit-queue, darin, ddkilzer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Fixes the bug none

Description Ryosuke Niwa 2017-06-07 17:59:00 PDT
Add a null pointer check.
Comment 1 Ryosuke Niwa 2017-06-07 17:59:23 PDT
<rdar://problem/32513144>
Comment 2 Ryosuke Niwa 2017-06-07 18:48:00 PDT
Created attachment 312264 [details]
Fixes the bug
Comment 3 Chris Dumez 2017-06-07 19:33:13 PDT
Comment on attachment 312264 [details]
Fixes the bug

r=me
Comment 4 WebKit Commit Bot 2017-06-07 20:10:46 PDT
Comment on attachment 312264 [details]
Fixes the bug

Clearing flags on attachment: 312264

Committed r217914: <http://trac.webkit.org/changeset/217914>
Comment 5 WebKit Commit Bot 2017-06-07 20:10:48 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Ryosuke Niwa 2017-06-08 20:16:39 PDT
This is likely a regression from https://trac.webkit.org/changeset/164195.
Comment 7 Darin Adler 2017-06-09 09:59:43 PDT
Comment on attachment 312264 [details]
Fixes the bug

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

> Source/WebKit2/WebProcess/Plugins/PluginView.cpp:1597
> +    RefPtr<Document> contentDocument = m_pluginElement->contentDocument();

Why RefPtr? Seems unnecessary if we are just getting a pointer and then immediately dereferencing it.
Comment 8 Ryosuke Niwa 2017-06-09 15:26:25 PDT
Comment on attachment 312264 [details]
Fixes the bug

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

>> Source/WebKit2/WebProcess/Plugins/PluginView.cpp:1597
>> +    RefPtr<Document> contentDocument = m_pluginElement->contentDocument();
> 
> Why RefPtr? Seems unnecessary if we are just getting a pointer and then immediately dereferencing it.

Oh yeah, I don't know why I used RefPtr here. Will fix.
Comment 9 Ryosuke Niwa 2017-06-09 22:11:43 PDT
Addressed the comment in https://trac.webkit.org/changeset/218046.