[Webkit-unassigned] [Bug 62808] [Qt] ASSERTION FAILED in ResourceHandle::setDefersLoading causes crash

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 13 08:05:06 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=62808





--- Comment #52 from yi shen <yi.4.shen at nokia.com>  2011-07-13 08:05:06 PST ---
(In reply to comment #51)
> (In reply to comment #49)
> > (In reply to comment #48)
> > > (In reply to comment #46)
> > > > Created an attachment (id=100537)
 --> (https://bugs.webkit.org/attachment.cgi?id=100537&action=review) [details] [details] [details] [details]
> > > > Fix the layout test
> > > > 
> > > > If QNetworkReplyHandler is set to synchronous load, it has to deliver content synchronously. Otherwise, it causes problems in some cases. e.g.
> > > > 
> > > > void ResourceHandle::loadResourceSynchronously(...) {
> > > >     ... ...
> > > >     RefPtr<ResourceHandle> handle = adoptRef(new ResourceHandle(request, &syncLoader, true, false));
> > > >     ... ...
> > > >     d->m_job = new QNetworkReplyHandler(handle.get(), QNetworkReplyHandler::SynchronousLoad, true);
> > > >     d->m_job->setLoadingDeferred(false);
> > > 
> > > This was done this way for d->m_job to be assigned before actually sending the request. Otherwise some callbacks could come before d->m_job could get assigned. setLoadingDeferred was abused a bit but the other options were not that better.
> > > 
> > > As the queue is owned by the QNetworkReplyHandler object an option would be to add a 'synchronous' flag to the class QNetworkReplyHandlerCallQueue and make it resume synchronously when needed.
> > 
> > Luiz, do u agree with Benjamin that we should explicitly flush the reply handler in the synchronous case?
> 
> Sure. I do. But I am not sure about what would be the API.
> 
> I think that we could have different classes for the synchronous and asynchronous cases. Then the asynchronous one could have setLoadingDeferred and the synchronous could have its own different interface. I was thinking about it at the time that I was working in this code, but I am not sure if it's worth.
> 
> I think that we could solve this problem here without changes to the interfaces and then open new bugs for further refactorings.
> 
> > 
> > The latest patch I made is using QNetworkReplyHandler's 'synchronous' flag to determine whether it should resume synchronously. And I have run the layout test on it and seems it works fine.

Thanks Luiz, let's see what Benjamin thinks. Also, what do u think my patch, is it the same solution as you proposed?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list