[Webkit-unassigned] [Bug 24043] [GTK] Workers with url 'about:blank' do not load

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 20 08:29:52 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=24043


zandobersek at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #27820|0                           |1
        is obsolete|                            |




------- Comment #3 from zandobersek at gmail.com  2009-02-20 08:29 PDT -------
Created an attachment (id=27830)
 --> (https://bugs.webkit.org/attachment.cgi?id=27830&action=view)
Report errors through an idle function when faced unsupported URL protocols

Catches URLs with unsupported protocol and adds idle function to the main loop
that reports error to resource handle's client.

In Loader::Host::servePendingRequests, a subresource loader is created for
every pending request with SubresourceLoader::create, but not yet added to the
map of loaders with requests that Loader::Host holds.
In this function, the return value of ResourceLoader::load is subsequently
checked, which causes to create a resource handle with ResourceHandle::create,
which also calls ResourceHandle::start. There, we check the protocol of
request's URL. In the case of bogus URLs, such as about:blank or foo:bar, we
immediately call didFail on the handle's client. This results in premature
return in Loader::Host::didFail and therefor we never get to call error on
resource of the request because the latter hasn't yet been added to the map of
loaders with requests.

To fix this, instead of immediately calling didFail on an URL with unknown
protocol, we add an idle function into the main loop. We also must return true,
otherwise there is no handle returned in ResourceHandle::create. This lets
things to move on - loader and request are added to the map, idle function is
executed and failure is reported, from there the error to the cached resource
is announced, which brings worker to the hold with calling notifyFinished.

With patch, test passes with no new regressions.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list