Bug 11162 - WebFrame calls Frame::begin() too early when loading requests
Summary: WebFrame calls Frame::begin() too early when loading requests
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 420+
Hardware: PC Windows XP
: P2 Normal
Assignee: Darin Fisher (:fishd, Google)
URL:
Keywords:
Depends on: 11190
Blocks:
  Show dependency treegraph
 
Reported: 2006-10-05 05:00 PDT by Darin Fisher (:fishd, Google)
Modified: 2006-10-06 12:10 PDT (History)
0 users

See Also:


Attachments
patch (2.19 KB, patch)
2006-10-05 05:05 PDT, Darin Fisher (:fishd, Google)
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Fisher (:fishd, Google) 2006-10-05 05:00:09 PDT
WebFrame calls Frame::begin() too early when loading requests.

It currently calls Frame::begin() from WebFrame::loadDataSource, but it should hold off until it gets the receivedResponse callback from the ResourceLoader.  Doing so will make it easy to feed mime type information into the Frame code.
Comment 1 Darin Fisher (:fishd, Google) 2006-10-05 05:05:42 PDT
Created attachment 10920 [details]
patch

Note, this patch gets us setup to specify the actual mime type of the response once we have that information available via the PlatformResponse object.  For now, this patch just feeds WebCore with "text/html" ... I will gladly comment out that part of the patch (or remove it) if that is desired.
Comment 2 Darin Adler 2006-10-05 07:40:02 PDT
Comment on attachment 10920 [details]
patch

Looks fine. r=me
Comment 3 Mark Rowe (bdash) 2006-10-05 14:47:08 PDT
Landed in r16822.
Comment 4 Dex Deacon 2006-10-06 12:09:06 PDT
This change causes a crash.  Frame::begin() creates the document, which is accessed in WebFrame::loadDataSource().  Without the call to Frame::begin() in that function, we get a NULL dereference.