Bug 27595

Summary: WebCore/Kit has a few places that don't gracefully handle a null request returned from willSendRequest
Product: WebKit Reporter: Brady Eidson <beidson>
Component: Page LoadingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Proposed fix
ggaren: review+
DRT enhancements and layout test ggaren: review+

Description Brady Eidson 2009-07-22 22:19:00 PDT
WebCore has a few places that don't gracefully handle a null request returned from willSendRequest.

-Windows' WebFrameLoaderClient.cpp doesn't expect it as a return value
-ResourceHandleCFNet.cpp doesn't respect it.
-InspectorController.cpp chokes on the next load after a load is cancelled this way.
Comment 1 Brady Eidson 2009-07-22 22:22:36 PDT
Created attachment 33314 [details]
Proposed fix
Comment 2 Geoffrey Garen 2009-07-22 22:24:39 PDT
Comment on attachment 33314 [details]
Proposed fix

Can you add a test for this? For example, could we configure the DRT resource load delegate to return null when asked to?
Comment 3 Brady Eidson 2009-07-22 22:41:34 PDT
Yah, that should be pretty easy.

I love it when the layout test work is substantially more than the patch itself  ;)

I'll do that in the A.M. then attach a new patch.
Comment 4 Brady Eidson 2009-07-23 19:12:30 PDT
Created attachment 33403 [details]
DRT enhancements and layout test
Comment 5 Geoffrey Garen 2009-07-23 19:30:48 PDT
Comment on attachment 33403 [details]
DRT enhancements and layout test

A patch is temporary. A layout test is forever! :)
Comment 6 Brady Eidson 2009-07-23 20:01:34 PDT
Sending        LayoutTests/ChangeLog
Adding         LayoutTests/http/tests/misc/resources/redirect-to-http-url.php
Adding         LayoutTests/http/tests/misc/will-send-request-returns-null-on-redirect-expected.txt
Adding         LayoutTests/http/tests/misc/will-send-request-returns-null-on-redirect.html
Sending        LayoutTests/platform/gtk/Skipped
Sending        LayoutTests/platform/qt/Skipped
Sending        WebCore/ChangeLog
Sending        WebCore/inspector/InspectorController.cpp
Sending        WebCore/platform/network/cf/ResourceHandleCFNet.cpp
Sending        WebKit/win/ChangeLog
Sending        WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
Sending        WebKitTools/ChangeLog
Sending        WebKitTools/DumpRenderTree/LayoutTestController.cpp
Sending        WebKitTools/DumpRenderTree/LayoutTestController.h
Sending        WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
Sending        WebKitTools/DumpRenderTree/mac/ResourceLoadDelegate.mm
Sending        WebKitTools/DumpRenderTree/win/ResourceLoadDelegate.cpp
Transmitting file data .................
Committed revision 46308.