void fireOnResponseReceived(RequestCallback callback) { if (xmlHttpRequest == null) { // the request has timed out at this point return; } timer.cancel(); /* * We cannot use cancel here because it would clear the contents of the * JavaScript XmlHttpRequest object so we manually null out our reference to * the JavaScriptObject */ final XMLHttpRequest xhr = xmlHttpRequest; xmlHttpRequest = null; Response response = createResponse(xhr); callback.onResponseReceived(this, response); }
void fireOnResponseReceived(RequestCallback callback) { if (xmlHttpRequest == null) { // the request has timed out at this point return; } timer.cancel(); /* * We cannot use cancel here because it would clear the contents of the * JavaScript XmlHttpRequest object so we manually null out our reference to * the JavaScriptObject */ final XMLHttpRequest xhr = xmlHttpRequest; xmlHttpRequest = null; Response response = createResponse(xhr); callback.onResponseReceived(this, response); }
void fireOnResponseReceived(RequestCallback callback) { if (xmlHttpRequest == null) { // the request has timed out at this point return; } timer.cancel(); /* * We cannot use cancel here because it would clear the contents of the * JavaScript XmlHttpRequest object so we manually null out our reference to * the JavaScriptObject */ final XMLHttpRequest xhr = xmlHttpRequest; xmlHttpRequest = null; Response response = createResponse(xhr); callback.onResponseReceived(this, response); }
public void fireOnResponseReceived(RequestCallback callback) { if (xmlHttpRequest == null) { // the request has timed out at this point return; } timer.cancel(); /* * We cannot use cancel here because it would clear the contents of the * JavaScript XmlHttpRequest object so we manually null out our reference to * the JavaScriptObject */ final XMLHttpRequest xhr = xmlHttpRequest; xmlHttpRequest = null; Response response = createResponse(xhr); callback.onResponseReceived(this, response); }