kpa*_*r87 7 firefox gwt xmlhttprequest
我正在使用版本2.5.1中的GWT开发应用程序.
几天前我们在日志中发现有大量的异常(每秒几个!!!),如下所示:
Nov 5, 2014 6:00:45 PM com.google.gwt.logging.server.RemoteLoggingServiceUtil logOnServer
SEVERE: (NS_ERROR_NOT_INITIALIZED) :
com.google.gwt.core.client.impl.SerializableThrowable$ThrowableWithClassName: (NS_ERROR_NOT_INITIALIZED) :
at Unknown.ZHe(StackTraceCreator.java:174)
at Unknown.WFe(StackTraceCreator.java:508)
at Unknown.IHf(Exceptions.java:29)
at Unknown.pIb(XMLHttpRequest.java:164)
at Unknown.OMe(RequestBuilder.java:411)
at Unknown.anonymous(XMLHttpRequest.java:351)
at Unknown.gHe(Impl.java:189)
at Unknown.jHe(Impl.java:243)
at Unknown.anonymous(Impl.java:70)
Run Code Online (Sandbox Code Playgroud)
至少在两种情况下,从Mozilla Firefox Web浏览器使用应用程序时发生问题.要阻止它,仅关闭浏览器是不够的,还要从任务管理器中终止进程.但我不确定它是否也不会被其他浏览器触发.
我还在com.google.gwt.http.client.Request类中找到了这条评论,方法为cancel():
/*
* There is a strange race condition that occurs on Mozilla when you cancel
* a request while the response is coming in. It appears that in some cases
* the onreadystatechange handler is still called after the handler function
* has been deleted and during the call to XmlHttpRequest.abort(). So we
* null the xmlHttpRequest here and that will prevent the
* fireOnResponseReceived method from calling the callback function.
*
* Setting the onreadystatechange handler to null gives us the correct
* behavior in Mozilla but crashes IE. That is why we have chosen to fixed
* this in Java by nulling out our reference to the XmlHttpRequest object.
*/
Run Code Online (Sandbox Code Playgroud)
我不知道请求是如何工作的,但我想知道Mozilla Firefox的新版本是否没有导致上述解决方案在某些情况下不起作用.
我还要补充一点,问题随机出现,我无法按需复制.
您是否知道问题的根源是什么?请您给我们任何建议如何解决这个问题,或者可能有一些解决方法如何处理它?
先感谢您!
| 归档时间: |
|
| 查看次数: |
2864 次 |
| 最近记录: |