You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This stack is problematic:
at DeltaManagerProxy.emit (events.js:132)
at DeltaManager. (deltaManagerProxy.ts:23)
at DeltaManager.emit (events.js:151)
at DeltaQueue. (deltaManager.ts:185)
at DeltaQueue.emit (events.js:151)
at callback (deltaQueue.ts:137)
at DeltaQueue.worker (deltaManager.ts:176)
at DeltaQueue.processDeltas (deltaQueue.ts:151)
Note EventEmitter implementation - this screws up error processing - we should not throw from here (but we do because of DeltaManagerProxy):
// If there is no 'error' event listener then throw.
if (doError) {
var er;
if (args.length > 0)
er = args[0];
if (er instanceof Error) {
// Note: The comments on the throw lines are intentional, they show
// up in Node's output if this results in an unhandled exception.
throw er; // Unhandled 'error' event
}
The text was updated successfully, but these errors were encountered:
This issue was discovered in 0.9, before DeltaManagerProxy was set to use the EventForwarder base class (introduced in this PR). This should be mostly resolved in 0.10+, because the EventForwarder does not subscribe to the source emitter events until someone listens to the forwarder for that event.
Problem (in 0.9):
someone meaningfully listens to DeltaManager error event.
DeltaManagerProxy listens to DeltaManager error event.
nobody listens to DeltaManagerProxy error event.
DeltaManager raises error event, calling all listeners.
DeltaManagerProxy throws error because it has no error listeners.
Same flow with EventForwarder, no problem (in 0.10):
someone meaningfully listens to DeltaManager error event.
nobody listens to DeltaManagerProxy error event.
because of (2), DeltaManagerProxy does not listen to DeltaManager error event.
DeltaManager raises error event, calling all listeners.
But it could still happen with an unsubscribe (in 0.10):
someone meaningfully listens to DeltaManager error event.
someone listens to DeltaManagerProxy error event.
because of (2), DeltaManagerProxy listens to DeltaManager error event.
someone removes their only listener to DeltaManagerProxy error event.
DeltaManager raises error event, calling all listeners.
DeltaManagerProxy throws error because it has no error listeners.
I doubt this occurs in practice, because the proxy will likely be disposed which will disconnect it from the source emitter, but should still be fixed. When all listeners to a single event are removed from the proxy, it should stop listening to the source emitter for that event.
This stack is problematic:
at DeltaManagerProxy.emit (events.js:132)
at DeltaManager. (deltaManagerProxy.ts:23)
at DeltaManager.emit (events.js:151)
at DeltaQueue. (deltaManager.ts:185)
at DeltaQueue.emit (events.js:151)
at callback (deltaQueue.ts:137)
at DeltaQueue.worker (deltaManager.ts:176)
at DeltaQueue.processDeltas (deltaQueue.ts:151)
Note EventEmitter implementation - this screws up error processing - we should not throw from here (but we do because of DeltaManagerProxy):
// If there is no 'error' event listener then throw.
if (doError) {
var er;
if (args.length > 0)
er = args[0];
if (er instanceof Error) {
// Note: The comments on the
throw
lines are intentional, they show// up in Node's output if this results in an unhandled exception.
throw er; // Unhandled 'error' event
}
The text was updated successfully, but these errors were encountered: