Bug 18935

Summary: [Gtk] Plugin Load crashes with NP_FULL mode
Product: WebKit Reporter: Sriram Neelakandan <sriram.neelakandan>
Component: Plug-insAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: marc.ordinasillopis, pierre-luc.beaudoin
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Fix for NP_FULL crash
alp: review+
Re-init variable in redirectDataToPlugin
alp: review+
Fix the bug for Qt hausmann: review+

Description Sriram Neelakandan 2008-05-07 22:32:46 PDT
NP_EMBED mode plugin works fine,
when the same plugin is loaded with the URL, it crashes at 


void PluginView::didReceiveData(const char* data, int length)
{
    ASSERT(m_loadManually);
    ASSERT(m_manualStream);
    m_manualStream->didReceiveData(0, data, length);
}

On further DEBUG i found m_manualStream is NULL.

Reason: PluginView::didReceiveResponse does not get called, from FrameLoaderClient::commitedLoad.

FrameLoaderCleint::m_hasSentResponseToPlugin is not initialized and has some JUNK data. So the following check fails :
        if (!m_hasSentResponseToPlugin) {
            m_pluginView->didReceiveResponse(loader->response());
            m_hasSentResponseToPlugin = true;
        }

I will attach a patch shortly to initialize m_hasSentResponseToPlugin
Comment 1 Sriram Neelakandan 2008-05-07 23:03:22 PDT
Created attachment 21007 [details]
Fix for NP_FULL crash

This uninitialized variable caused a crash as explained in the bug
Comment 2 Sriram Neelakandan 2008-05-07 23:05:12 PDT
Created attachment 21008 [details]
Re-init variable in redirectDataToPlugin

Not sure if this one is required.
May be some one who knows the code better can take this in if required.
Comment 3 marcoil 2008-05-08 08:17:06 PDT
Created attachment 21017 [details]
Fix the bug for Qt

This is the same fix applied to the Qt port.
Comment 4 Simon Hausmann 2008-05-09 01:52:19 PDT
Comment on attachment 21017 [details]
Fix the bug for Qt

#21017 landed in r33001.
Comment 5 marcoil 2008-05-12 01:33:53 PDT
The Gtk patches haven't landed yet, so I think this one should be re-opened.
Comment 6 Pierre-Luc Beaudoin 2008-05-12 06:33:45 PDT
Reopening for the Gtk patch.
Comment 7 Alp Toker 2008-05-25 02:56:45 PDT
Landed in r34121.