Browse Source

Fixes issues after review

dev1
hristoterezov 9 years ago
parent
commit
85fd13a082
3 changed files with 9 additions and 6 deletions
  1. 6
    3
      JitsiConference.js
  2. 2
    2
      modules/util/GlobalOnErrorHandler.js
  3. 1
    1
      modules/xmpp/JingleSessionPC.js

+ 6
- 3
JitsiConference.js View File

@@ -1083,8 +1083,10 @@ function setupListeners(conference) {
1083 1083
     conference.room.addListener(XMPPEvents.CONNECTION_RESTORED, function () {
1084 1084
         conference.eventEmitter.emit(JitsiConferenceEvents.CONNECTION_RESTORED);
1085 1085
     });
1086
-    conference.room.addListener(XMPPEvents.CONFERENCE_SETUP_FAILED, function () {
1087
-        conference.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_FAILED, JitsiConferenceErrors.SETUP_FAILED);
1086
+    conference.room.addListener(XMPPEvents.CONFERENCE_SETUP_FAILED,
1087
+    function (error) {
1088
+        conference.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_FAILED,
1089
+            JitsiConferenceErrors.SETUP_FAILED, error);
1088 1090
     });
1089 1091
 
1090 1092
     conference.room.addListener(AuthenticationEvents.IDENTITY_UPDATED, function (authEnabled, authIdentity) {
@@ -1296,7 +1298,8 @@ function setupListeners(conference) {
1296 1298
             function (pc) {
1297 1299
                 conference.statistics.sendIceConnectionFailedEvent(pc);
1298 1300
                 conference.room.eventEmitter.emit(
1299
-                    XMPPEvents.CONFERENCE_SETUP_FAILED);
1301
+                    XMPPEvents.CONFERENCE_SETUP_FAILED,
1302
+                    new Error("ICE fail")); 
1300 1303
             });
1301 1304
 
1302 1305
         conference.rtc.addListener(RTCEvents.TRACK_ATTACHED,

+ 2
- 2
modules/util/GlobalOnErrorHandler.js View File

@@ -62,7 +62,7 @@ var GlobalOnErrorHandler = {
62 62
         var errHandler = window.onerror;
63 63
         if(!errHandler)
64 64
             return;
65
-        errHandler.call(null, null, null, null, null, error);
65
+        errHandler(null, null, null, null, error);
66 66
     },
67 67
     /**
68 68
      * Calls the global rejection handler if there is one.
@@ -72,7 +72,7 @@ var GlobalOnErrorHandler = {
72 72
         var errHandler = window.onunhandledrejection;
73 73
         if(!errHandler)
74 74
             return;
75
-        errHandler.call(null, error);
75
+        errHandler(error);
76 76
     }
77 77
 };
78 78
 

+ 1
- 1
modules/xmpp/JingleSessionPC.js View File

@@ -1218,7 +1218,7 @@ JingleSessionPC.prototype.newJingleErrorHandler = function(request, failureCb) {
1218 1218
 
1219 1219
 JingleSessionPC.onJingleFatalError = function (session, error)
1220 1220
 {
1221
-    this.room.eventEmitter.emit(XMPPEvents.CONFERENCE_SETUP_FAILED);
1221
+    this.room.eventEmitter.emit(XMPPEvents.CONFERENCE_SETUP_FAILED, error);
1222 1222
     this.room.eventEmitter.emit(XMPPEvents.JINGLE_FATAL_ERROR, session, error);
1223 1223
 };
1224 1224
 

Loading…
Cancel
Save