Bug 106348 - Plug-ins shouldn’t be added to list to autostart if you start a plugin in private browsing
Summary: Plug-ins shouldn’t be added to list to autostart if you start a plugin in pri...
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Plug-ins (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brian Weinstein
URL:
Keywords: InRadar
Depends on: 106367
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-08 10:54 PST by Brian Weinstein
Modified: 2013-01-14 16:02 PST (History)
5 users (show)

See Also:


Attachments
Fix (2.38 KB, patch)
2013-01-08 10:58 PST, Brian Weinstein
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Weinstein 2013-01-08 10:54:27 PST
Plug-ins shouldn’t be added to list to autostart if you start a plugin in private browsing

<rdar://problem/12968442>
Comment 1 Brian Weinstein 2013-01-08 10:58:40 PST
Created attachment 181709 [details]
Fix
Comment 2 Anders Carlsson 2013-01-08 12:17:28 PST
Comment on attachment 181709 [details]
Fix

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()->mainFrame()->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
}
Comment 3 Brian Weinstein 2013-01-08 12:47:24 PST
Landed in http://trac.webkit.org/changeset/139096.
Comment 4 WebKit Review Bot 2013-01-08 12:58:09 PST
Re-opened since this is blocked by bug 106367