[webkit-reviews] review granted: [Bug 106348]=?UTF-8?Q?=20Plug=2Dins=20shouldn=E2=80=99t=20be=20added=20to=20list=20to=20autostart=20if=20you=20start=20a=20plugin=20in=20private=20browsing=20?=: [Attachment 181709] Fix
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jan 8 12:15:33 PST 2013
Anders Carlsson <andersca at apple.com> has granted Brian Weinstein
<bweinstein at apple.com>'s request for review:
Bug 106348: Plug-ins shouldn’t be added to list to autostart if you start a
plugin in private browsing
https://bugs.webkit.org/show_bug.cgi?id=106348
Attachment 181709: Fix
https://bugs.webkit.org/attachment.cgi?id=181709&action=review
------- Additional Comments from Anders Carlsson <andersca at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=181709&action=review
> Source/WebCore/html/HTMLPlugInImageElement.cpp:271
> - if (document()->page())
> + if (document()->page() && document()->settings() &&
!document()->settings()->privateBrowsingEnabled())
>
document()->page()->plugInClient()->addAutoStartOrigin(document()->page()->main
Frame()->document()->baseURL().host(), m_plugInOriginHash);
I don't think you need to null check document()->settings() here since settings
can only be null if page is null. I think this'd read better as
if (Page* page = document->page()) {
if (!settings->privateBrowsingEnabled())
page->plugInClient()-> etc etc
}
More information about the webkit-reviews
mailing list