RESOLVED FIXED 22619
XMLHttpRequest needs to use scriptExecutionContext() instead of document() where possible.
https://bugs.webkit.org/show_bug.cgi?id=22619
Summary XMLHttpRequest needs to use scriptExecutionContext() instead of document() wh...
David Levin
Reported 2008-12-02 23:59:04 PST
XMLHttpRequest should avoid using document() when a worker is being used. The change should tackle the straightforward modifications to enable this.
Attachments
Patch for bug. (5.39 KB, patch)
2008-12-03 00:07 PST, David Levin
no flags
Removed the change to reportUnsafeUsage. (3.00 KB, patch)
2008-12-03 12:05 PST, David Levin
ap: review-
Addressed comments. (1.88 KB, patch)
2008-12-03 21:53 PST, David Levin
ap: review+
David Levin
Comment 1 2008-12-03 00:07:32 PST
Created attachment 25701 [details] Patch for bug. It doesn't yet remove all references to document() in XMLHttpRequest. It will take some more changes to do that (to add in the wiring to send things back through the Worker's owner document).
David Levin
Comment 2 2008-12-03 12:05:44 PST
Created attachment 25717 [details] Removed the change to reportUnsafeUsage. "reportException is for reporting exceptions, not arbitrary errors", so I removed its usage in reportUnsafeUsage.
Alexey Proskuryakov
Comment 3 2008-12-03 13:34:10 PST
Comment on attachment 25717 [details] Removed the change to reportUnsafeUsage. Code changes all look right, but the ChangeLog may be a little too expressive :). I think that the full history should go to bug comments, not into ChangeLog. Also, the description of responseXML changes is a bit misleading - the purpose is not to zero out m_responseXML, but to return null without executing code that is not thread safe. I'm going to say r- for now, because ChangeLog takes the biggest part of this patch, and it needs to be significantly modified.
David Levin
Comment 4 2008-12-03 21:53:49 PST
Created attachment 25735 [details] Addressed comments.
Alexey Proskuryakov
Comment 5 2008-12-03 22:56:41 PST
Comment on attachment 25735 [details] Addressed comments. r=me
Alexey Proskuryakov
Comment 6 2008-12-03 23:22:15 PST
Committed revision 38987.
Note You need to log in before you can comment on or make changes to this bug.