Bug 1088672 - Part 4. Rewrite Loop's incoming call handling in the flux style. Put back alerts and make window unload be handled correctly. r=mikedeboer

This commit is contained in:
Mark Banner
2015-03-12 14:01:38 +00:00
parent 6d4149d79b
commit 83d1858561
7 changed files with 108 additions and 35 deletions

View File

@@ -425,6 +425,12 @@ loop.store = loop.store || {};
* as shutting down the call cleanly and adding any relevant telemetry data.
*/
windowUnload: function() {
if (!this.getStoreState("outgoing") &&
this.getStoreState("callState") === CALL_STATES.ALERTING &&
this._websocket) {
this._websocket.decline();
}
this._endSession();
},