Bug 50083

Summary: [Gtk] ASSERT(d->m_response.isNull()) in contentSniffedCallback
Product: WebKit Reporter: Sergio Villar Senin <svillar>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, xan.lopez
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Fix for the bug
xan.lopez: review-
Fix for the bug none

Sergio Villar Senin
Reported 2010-11-25 08:08:51 PST
We are easily reaching that assertion since 72695. The problem is located in soup-request-http.c. We're emitting the "content-sniffed" callback without even considering that the sniffing was not enabled for each particular message (see startHttp in ResourceHandleSoup.cpp)
Attachments
Fix for the bug (3.25 KB, patch)
2010-11-25 08:14 PST, Sergio Villar Senin
xan.lopez: review-
Fix for the bug (4.74 KB, patch)
2010-11-26 06:51 PST, Sergio Villar Senin
no flags
Sergio Villar Senin
Comment 1 2010-11-25 08:14:19 PST
Created attachment 74881 [details] Fix for the bug This should be "the right thing". We should not emit the content-sniffed callback if it was disabled for that particular SoupMessage. The problem is that soup_message_disables_feature is not in the public API of SoupMessage. My proposal would be to just apply the changes in ResourceHandleSoup.cpp (i.e. do not connect to the "content-sniffed" signal) because: * it's correct anyway * it'll fix the bug * the invalid signal emission is located in the soup imported code, and thus, when moved there the soup_message_disables_feature could be easily added then (we can add that code as a comment)
Sergio Villar Senin
Comment 2 2010-11-25 08:37:24 PST
Adding Mr. Lopez (a.k.a SoupCache bug hunter)
Xan Lopez
Comment 3 2010-11-26 06:12:48 PST
Comment on attachment 74881 [details] Fix for the bug View in context: https://bugs.webkit.org/attachment.cgi?id=74881&action=review > WebCore/platform/network/soup/ResourceHandleSoup.cpp:591 > As discussed yesterday in person this is logically wrong, should go in an else block. Other than that the patch makes sense to me (let's get it in ASAP, it ASSERTs really frequently).
Sergio Villar Senin
Comment 4 2010-11-26 06:51:46 PST
Created attachment 74934 [details] Fix for the bug Final version of the patch: * connect to content-sniffed signal if handle->shouldContentSniff() * fixed an potential early finalization of an object * added comments with the "proper" fix inside the cache code to be migrated to libsoup
Xan Lopez
Comment 5 2010-11-26 07:16:01 PST
Comment on attachment 74934 [details] Fix for the bug r=me
WebKit Commit Bot
Comment 6 2010-11-26 07:52:50 PST
Comment on attachment 74934 [details] Fix for the bug Clearing flags on attachment: 74934 Committed r72762: <http://trac.webkit.org/changeset/72762>
WebKit Commit Bot
Comment 7 2010-11-26 07:52:55 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.