[gwt-contrib] Proposed API Change - Remove HTTPRequest

1 view
Skip to first unread message

John LaBanca

unread,
Feb 4, 2010, 5:23:37 PM2/4/10
to Google Web Toolkit Contributors
Description:
==========
HTTPRequest has been deprecated since GWT 1.5 in exchange for RequestBuilder.  I propose that we remove HTTPRequest from the API completely.


Why the sudden interest in axing code?
==============================
HTTPRequest has a bug that causes IE8 to show a popup error message.  HTTPRequest sets xmlHttp.onreadystatechange to HTTPRequestImpl::nullFunc, but HTTPRequestImpl::nullFunc is never initialized and is actually null (not a function). In the latest version of IE8, this results in an error popup and causes our tests to fail. It looks like older versions of IE ignore it.

The problem is that HTTPRequest uses HTTPRequestImpl::nullFunc without creating an instance of HTTPRequestImpl, and thus never initializing nullFunc. It looks like HTTPRequest was refactored at some point not to use HTTPRequestImpl except for its nullFunc.

Why not just fix it?
===============
HTTPRequest has been deprecated since GWT 1.5, so its ripe for removal.  In addition, it looks like we've already run into similar problems with XMLHttpRequest, where we've specifically noted that "[re]using the same function object kills HtmlUnit".  Surprisingly enough, maintaining two versions of the same code leads to bad things.

Thanks,
John LaBanca
jlab...@google.com

Ray Ryan

unread,
Feb 4, 2010, 5:28:20 PM2/4/10
to google-web-tool...@googlegroups.com
Kill it! KILLLL IIIIITTT!

John LaBanca

unread,
Feb 10, 2010, 11:19:51 AM2/10/10
to google-web-tool...@googlegroups.com
The beast has been slain as of r7543:

Thanks,
John LaBanca
jlab...@google.com


On Thu, Feb 4, 2010 at 5:28 PM, Ray Ryan <rj...@google.com> wrote:
Kill it! KILLLL IIIIITTT!

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Ray Ryan

unread,
Feb 10, 2010, 11:23:24 AM2/10/10
to google-web-tool...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages