Bug 111003

Summary: REGRESSION (48533): Full-frame plugins stopped working (download instead of loading the plugin)
Product: WebKit Reporter: Jer Noble <jer.noble>
Component: New BugsAssignee: Jer Noble <jer.noble>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch andersca: review+

Description Jer Noble 2013-02-27 12:19:48 PST
REGRESSION (48533): Full-frame plugins stopped working (download instead of loading the plugin)
Comment 1 Jer Noble 2013-02-27 12:21:31 PST
Created attachment 190575 [details]
Patch
Comment 2 Anders Carlsson 2013-02-27 12:33:38 PST
Comment on attachment 190575 [details]
Patch

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

> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:3794
> +    if (PluginData* pluginData = m_page->pluginData()) {
> +        if (pluginData->supportsMimeType(MIMEType) && m_page->settings()->arePluginsEnabled())
> +            return true;
> +    }

I think you want to check if plug-ins are enabled before calling pluginData, since that can be a sync call out to the web process.
Comment 3 Jer Noble 2013-02-27 12:36:34 PST
(In reply to comment #2)
> (From update of attachment 190575 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=190575&action=review
> 
> > Source/WebKit2/WebProcess/WebPage/WebPage.cpp:3794
> > +    if (PluginData* pluginData = m_page->pluginData()) {
> > +        if (pluginData->supportsMimeType(MIMEType) && m_page->settings()->arePluginsEnabled())
> > +            return true;
> > +    }
> 
> I think you want to check if plug-ins are enabled before calling pluginData, since that can be a sync call out to the web process.

This should be covered by the line:

    if (!mainFrame()->loader()->subframeLoader()->allowPlugins(NotAboutToInstantiatePlugin))

In Page::pluginData(), which calls settings->arePluginsEnabled(), but allows the client to override the setting.

Thanks!
Comment 4 Jer Noble 2013-02-27 12:46:40 PST
Committed r144228: <http://trac.webkit.org/changeset/144228>