angular-cn/packages/zone.js/test/browser
JiaLiPassion d92a0dd72f fix(zone.js): should invoke xhr send task when no response error occurs (#38836)
Close #38795

in the XMLHttpRequest patch, when get `readystatechange` event, zone.js try to
invoke `load` event listener first, then call `invokeTask` to finish the
`XMLHttpRequest::send` macroTask, but if the request failed because the
server can not be reached, the `load` event listener will not be invoked,
so the `invokeTask` of the `XMLHttpRequest::send` will not be triggered either,
so we will have a non finished macroTask there which will make the Zone
not stable, also memory leak.

So in this PR, if the `XMLHttpRequest.status = 0` when we get the `readystatechange`
event, that means something wents wrong before we reached the server, we need to
invoke the task to finish the macroTask.

PR Close #38836
2020-09-18 11:19:37 -07:00
..
FileReader.spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
HTMLImports.spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
MediaQuery.spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
MutationObserver.spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
Notification.spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
WebSocket.spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
Worker.spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
XMLHttpRequest.spec.ts fix(zone.js): should invoke xhr send task when no response error occurs (#38836) 2020-09-18 11:19:37 -07:00
browser.spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
custom-element.spec.js build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
define-property.spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
element.spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
geolocation.spec.manual.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
messageport.spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
registerElement.spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
requestAnimationFrame.spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
shadydom.spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00