Bug 27595 - WebCore/Kit has a few places that don't gracefully handle a null request returned from willSendRequest
Summary: WebCore/Kit has a few places that don't gracefully handle a null request retu...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-22 22:19 PDT by Brady Eidson
Modified: 2009-07-23 20:01 PDT (History)
0 users

See Also:


Attachments
Proposed fix (3.16 KB, patch)
2009-07-22 22:22 PDT, Brady Eidson
ggaren: review+
Details | Formatted Diff | Diff
DRT enhancements and layout test (10.54 KB, patch)
2009-07-23 19:12 PDT, Brady Eidson
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.