Bug 24389

Summary: WebKitGTK+ crashes when cancelling plugin loads
Product: WebKit Reporter: Gustavo Noronha (kov) <gns>
Component: WebKitGTKAssignee: Gustavo Noronha (kov) <gns>
Status: RESOLVED FIXED    
Severity: Normal Keywords: Gtk, Soup
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
backtrace
none
proposed fix ap: review+

Description Gustavo Noronha (kov) 2009-03-05 09:50:11 PST
If you go to a page that uses plugins such as flash, and click a link or cancel the load, the browser will crash. Investigating the problem I found out that our ResourceHandle implementation calls didFinishLoading in it's cancel method, which is completely bogus, the way I understand the workflow, and is not done by any other ports except for the Windows (WebCore/platform/network/win/ResourceHandleWin.cpp) port.

I made a patch removing the calls to didFinishLoading, and tested with acid2, acid3, and the webkit layout tests, and found no regression. The crash is also gone.
Comment 1 Gustavo Noronha (kov) 2009-03-05 09:52:32 PST
Created attachment 28307 [details]
backtrace
Comment 2 Gustavo Noronha (kov) 2009-03-05 09:53:08 PST
Created attachment 28308 [details]
proposed fix
Comment 3 Alexey Proskuryakov 2009-03-05 10:28:14 PST
Comment on attachment 28308 [details]
proposed fix

> +        didFinishLoading here is mostly innofensive for most loads, but

Typo: inoffensive. Please add a bug URL to ChangeLog.

r=me
Comment 4 Gustavo Noronha (kov) 2009-03-05 10:51:45 PST
Landed as r41453.