summaryrefslogtreecommitdiff
path: root/tools/node_modules/eslint/node_modules/rxjs/_esm2015/internal/Subscriber.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/node_modules/eslint/node_modules/rxjs/_esm2015/internal/Subscriber.js')
-rw-r--r--tools/node_modules/eslint/node_modules/rxjs/_esm2015/internal/Subscriber.js24
1 files changed, 4 insertions, 20 deletions
diff --git a/tools/node_modules/eslint/node_modules/rxjs/_esm2015/internal/Subscriber.js b/tools/node_modules/eslint/node_modules/rxjs/_esm2015/internal/Subscriber.js
index dd90207b59..553001ee25 100644
--- a/tools/node_modules/eslint/node_modules/rxjs/_esm2015/internal/Subscriber.js
+++ b/tools/node_modules/eslint/node_modules/rxjs/_esm2015/internal/Subscriber.js
@@ -22,11 +22,10 @@ export class Subscriber extends Subscription {
break;
}
if (typeof destinationOrNext === 'object') {
- if (isTrustedSubscriber(destinationOrNext)) {
- const trustedSubscriber = destinationOrNext[rxSubscriberSymbol]();
- this.syncErrorThrowable = trustedSubscriber.syncErrorThrowable;
- this.destination = trustedSubscriber;
- trustedSubscriber._addParentTeardownLogic(this);
+ if (destinationOrNext instanceof Subscriber) {
+ this.syncErrorThrowable = destinationOrNext.syncErrorThrowable;
+ this.destination = destinationOrNext;
+ destinationOrNext.add(this);
}
else {
this.syncErrorThrowable = true;
@@ -55,14 +54,12 @@ export class Subscriber extends Subscription {
if (!this.isStopped) {
this.isStopped = true;
this._error(err);
- this._unsubscribeParentSubscription();
}
}
complete() {
if (!this.isStopped) {
this.isStopped = true;
this._complete();
- this._unsubscribeParentSubscription();
}
}
unsubscribe() {
@@ -83,16 +80,6 @@ export class Subscriber extends Subscription {
this.destination.complete();
this.unsubscribe();
}
- _addParentTeardownLogic(parentTeardownLogic) {
- if (parentTeardownLogic !== this) {
- this._parentSubscription = this.add(parentTeardownLogic);
- }
- }
- _unsubscribeParentSubscription() {
- if (this._parentSubscription !== null) {
- this._parentSubscription.unsubscribe();
- }
- }
_unsubscribeAndRecycle() {
const { _parent, _parents } = this;
this._parent = null;
@@ -236,7 +223,4 @@ export class SafeSubscriber extends Subscriber {
_parentSubscriber.unsubscribe();
}
}
-function isTrustedSubscriber(obj) {
- return obj instanceof Subscriber || ('_addParentTeardownLogic' in obj && obj[rxSubscriberSymbol]);
-}
//# sourceMappingURL=Subscriber.js.map \ No newline at end of file