[Webkit-unassigned] [Bug 49633] Add .responseType and .response to XMLHttpRequest

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 19 14:13:08 PST 2010


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





--- Comment #10 from Alexey Proskuryakov <ap at webkit.org>  2010-11-19 14:13:07 PST ---
> Can you please give me a few more details of what actual code I should add there - thanks!

For responseXML, the following needs to be added to JSXMLHttpRequest::markChildren in JSXMLHttpRequestCustom.cpp:

+    if (Document* responseDocument = m_impl->optionalResponseXML())
+        markDOMObjectWrapper(markStack, *Heap::heap(this)->globalData(), responseDocument);

Here, XMLHttpRequest::optionalResponseXML() will be a new function that returns m_responseXML if it's already non-zero, similar to optionalUpload().

The same needs to be added for any object that XMLHttpRequest exposes to bindings as .response.

This of course requires tests that fail without the additional code, but pass with it. Something like:

// ... request an XML resource
req.responseXML.foo = "bar";
gc();
shouldBe("req.responseXML.foo", "'bar'");

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



More information about the webkit-unassigned mailing list