[webkit-dev] XMLHttpRequest and Workers

Alexey Proskuryakov ap at webkit.org
Mon Dec 15 22:45:06 PST 2008


Dec 15, 2008, в 9:47 AM, David Levin написал(а):

> This is how I plan to finish making XMLHttpRequest available for  
> workers
> http://docs.google.com/Doc?id=dg7mj9sd_6dvthmdqj
>
> Let me know if you have any comments.

As discussed earlier, this looks good to me.

> It may make the code more complicated to handle both WorkerContext  
> and Document in some places (like responseXML)
> It makes the code a bit more fragile to future changes in which code  
> may be added that uses document() which is executed on the Worker.
> To alleviate this, it makes sense to divide up the functionality  
> into three classes: XMLHttpRequestBase, XMLHttpRequest, and  
> XMLHttpRequestWorker. In general, I expect 90%+ of the functionality  
> to be in XMLHttpRequestBase, but any references to document() will  
> be isolated to XMLHttpRequest.

I'm not much of a fan of this idea, because we want to make Worker  
functionality closer to main thread one in the future, and this would  
be a step in opposite direction. On the other hand, this division can  
be undone later if needed, so it all depends on how much forking needs  
to be introduced in XMLHttpRequest otherwise.

As far as fragility is concerned, I think that the right way to avoid  
it is via extensive test coverage.

- WBR, Alexey Proskuryakov

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20081216/eb3a825e/attachment.html>


More information about the webkit-dev mailing list