angular-cn/packages/zone.js/lib/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
..
api-util.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
browser-legacy.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
browser-util.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
browser.ts fix(zone.js): should invoke xhr send task when no response error occurs (#38836) 2020-09-18 11:19:37 -07:00
canvas.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
custom-elements.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
define-property.ts fix(zone.js): run tests in umd format (#37582) 2020-09-08 12:44:18 -07:00
event-target-legacy.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
event-target.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
message-port.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
property-descriptor-legacy.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
property-descriptor.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
register-element.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
rollup-common.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
rollup-legacy-main.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
rollup-legacy-test-main.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
rollup-main.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
rollup-test-main.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
shadydom.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
webapis-media-query.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
webapis-notification.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
webapis-resize-observer.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
webapis-rtc-peer-connection.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
webapis-user-media.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
websocket.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00