diff options
Diffstat (limited to 'tools/node_modules/eslint/node_modules/rxjs/_esm5/internal/Subscriber.js')
-rw-r--r-- | tools/node_modules/eslint/node_modules/rxjs/_esm5/internal/Subscriber.js | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/tools/node_modules/eslint/node_modules/rxjs/_esm5/internal/Subscriber.js b/tools/node_modules/eslint/node_modules/rxjs/_esm5/internal/Subscriber.js index 03220f852a..f232946240 100644 --- a/tools/node_modules/eslint/node_modules/rxjs/_esm5/internal/Subscriber.js +++ b/tools/node_modules/eslint/node_modules/rxjs/_esm5/internal/Subscriber.js @@ -25,11 +25,10 @@ var Subscriber = /*@__PURE__*/ (function (_super) { break; } if (typeof destinationOrNext === 'object') { - if (isTrustedSubscriber(destinationOrNext)) { - var 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; @@ -59,14 +58,12 @@ var Subscriber = /*@__PURE__*/ (function (_super) { if (!this.isStopped) { this.isStopped = true; this._error(err); - this._unsubscribeParentSubscription(); } }; Subscriber.prototype.complete = function () { if (!this.isStopped) { this.isStopped = true; this._complete(); - this._unsubscribeParentSubscription(); } }; Subscriber.prototype.unsubscribe = function () { @@ -87,16 +84,6 @@ var Subscriber = /*@__PURE__*/ (function (_super) { this.destination.complete(); this.unsubscribe(); }; - Subscriber.prototype._addParentTeardownLogic = function (parentTeardownLogic) { - if (parentTeardownLogic !== this) { - this._parentSubscription = this.add(parentTeardownLogic); - } - }; - Subscriber.prototype._unsubscribeParentSubscription = function () { - if (this._parentSubscription !== null) { - this._parentSubscription.unsubscribe(); - } - }; Subscriber.prototype._unsubscribeAndRecycle = function () { var _a = this, _parent = _a._parent, _parents = _a._parents; this._parent = null; @@ -247,7 +234,4 @@ var SafeSubscriber = /*@__PURE__*/ (function (_super) { return SafeSubscriber; }(Subscriber)); export { SafeSubscriber }; -function isTrustedSubscriber(obj) { - return obj instanceof Subscriber || ('_addParentTeardownLogic' in obj && obj[rxSubscriberSymbol]); -} //# sourceMappingURL=Subscriber.js.map |