[webkit-reviews] review requested: [Bug 27444] Wrong FrameLoader::activeDocumentLoader when loading a invalid URL. : [Attachment 33081] set the provisional documentLoader as the activeDocument in case of load failures (v0.1)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 20 06:35:24 PDT 2009


Antonio Gomes (tonikitoo) <tonikitoo at gmail.com> has asked  for review:
Bug 27444: Wrong FrameLoader::activeDocumentLoader when loading a invalid URL.
https://bugs.webkit.org/show_bug.cgi?id=27444

Attachment 33081: set the provisional documentLoader as the activeDocument in
case of load failures (v0.1)
https://bugs.webkit.org/attachment.cgi?id=33081&action=review

------- Additional Comments from Antonio Gomes (tonikitoo)
<tonikitoo at gmail.com>
Steps to reproduce:

1) load a valid url (e.g. http://google.com). Calling:

FrameLoader::activeDocumentLoader::originalURL() -> http://google.com
FrameLoader::activeDocumentLoader::url() -> http://www.google.com
(resolved/redirected)

--> FROM GDB we see that the proper DocumentLoader is set to the FrameLoader
after the load succeeds (see below):

gdb_$ b FrameLoader.cpp:setDocumentLoader
gdb_$ bt
FrameLoader::finishedLoading:3092
DocumentLoader::finishedLoading:353
main frame - willCloseFrame
FrameLoader::stopLoading:566
FrameLoader::transitionToCommitted:2869
*******FrameLoader::setDocumentLoader:2691 'loader=0x886bdb0'

2) after that, load an invalid url (e.g. http://abcdef.abcdef). 

--> Since it fails to load, FrameLoader::setDocumentLoader is *never* called,
and so calling Frameloader::activeDocumentLoader() returns a reference to
"0x886bdb0" (documentLoader of the previous loaded URL - see above). It results
in wrong originalURL values:

FrameLoader::activeDocumentLoader::originalURL() -> http://google.com	  
<---- WRONG
FrameLoader::activeDocumentLoader::url() -> http://abcdef.abcdef


More information about the webkit-reviews mailing list