Bug 68696

Summary: [Qt][WK2] QtFileDownloader ctor shouldn't call QtFileDownloader::onReadyRead()
Product: WebKit Reporter: Jesus Sanchez-Palencia <jesus>
Component: New BugsAssignee: Jesus Sanchez-Palencia <jesus>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 68962    
Attachments:
Description Flags
Patch none

Description Jesus Sanchez-Palencia 2011-09-23 07:42:20 PDT
[Qt][WK2] QtFileDownloader ctor shouldn't call QtFileDownloader::onReadyRead()
Comment 1 Jesus Sanchez-Palencia 2011-09-23 07:50:06 PDT
Created attachment 108473 [details]
Patch
Comment 2 Andreas Kling 2011-09-23 07:53:55 PDT
Comment on attachment 108473 [details]
Patch

r=me
Comment 3 Jesus Sanchez-Palencia 2011-09-23 08:05:41 PDT
Comment on attachment 108473 [details]
Patch

Clearing flags on attachment: 108473

Committed r95804: <http://trac.webkit.org/changeset/95804>
Comment 4 Jesus Sanchez-Palencia 2011-09-23 08:05:48 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Jesus Sanchez-Palencia 2011-09-23 08:12:23 PDT
Just clarifying this fix a bit:

The Download object was holding a NULL pointer to QtFileDownloader because QtFileDownloader ctor was starting everything by calling onReadyRead(). So even before the return of the ctor QtFileDownloader was calling functions from Download that were trying to call back functions from a null QtFileDownloader, crashing WebProcess.

Now we call the ctor and then QtFileDownloader::start().