angular/packages/zone.js/lib
JiaLiPassion 96aa14df01 fix(zone.js): zone patch rxjs should return null _unsubscribe correctly. (#37091)
Close #31684.

In some rxjs operator, such as `retryWhen`, rxjs internally will set
`Subscription._unsubscribe` method to null, and the current zone.js monkey patch
didn't handle this case correctly, even rxjs set _unsubscribe to null, zone.js
still return a function by finding the prototype chain.

This PR fix this issue and the following test will pass.

```
const errorGenerator = () => {
  return throwError(new Error('error emit'));
};

const genericRetryStrategy = (finalizer: () => void) => (attempts: Observable<any>) =>
    attempts.pipe(
      mergeMap((error, i) => {
        const retryAttempt = i + 1;
        if (retryAttempt > 3) {
          return throwError(error);
        }
        return timer(retryAttempt * 1);
      }),
      finalize(() => finalizer()));

errorGenerator()
  .pipe(
    retryWhen(genericRetryStrategy(() => {
      expect(log.length).toBe(3);
      done();
    })),
    catchError(error => of(error)))
  .subscribe()
```

PR Close #37091
2020-07-27 12:10:27 -07:00
..
browser feat(zone.js): move MutationObserver/FileReader to different module (#31657) 2020-07-24 15:12:28 -07:00
closure build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
common fix(zone.js): clearTimeout/clearInterval should call on object global (#37858) 2020-07-24 15:22:47 -07:00
extra fix(zone.js): remove unused Promise overwritten setter logic (#36851) 2020-06-11 18:56:19 -07:00
jasmine feat(zone.js): patch jasmine.createSpyObj to make properties enumerable to be true (#34624) 2020-06-29 12:22:08 -07:00
jest build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
mix build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
mocha build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
node fix(zone.js): patch nodejs EventEmtter.prototype.off (#37863) 2020-07-24 15:45:00 -07:00
rxjs fix(zone.js): zone patch rxjs should return null _unsubscribe correctly. (#37091) 2020-07-27 12:10:27 -07:00
testing build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
zone-spec feat(zone.js): upgrade zone.js to angular package format(APF) (#36540) 2020-06-11 11:08:48 -07:00
BUILD.bazel refactor: update to tslib 2.0 and move to direct dependencies (#37198) 2020-05-19 14:57:09 -07:00
zone.api.extensions.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
zone.configurations.api.ts feat(zone.js): move MutationObserver/FileReader to different module (#31657) 2020-07-24 15:12:28 -07:00
zone.ts fix(zone.js): remove unused Promise overwritten setter logic (#36851) 2020-06-11 18:56:19 -07:00