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

_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to