Browse Source

Updates unhandledrejection handler to not relay on JitsiMeetJS being global and fixes onerror handler.

dev1
damencho 9 years ago
parent
commit
6ade76ab0e
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      JitsiMeetJS.js

+ 3
- 3
JitsiMeetJS.js View File

65
 
65
 
66
                 if (oldOnErrorHandler)
66
                 if (oldOnErrorHandler)
67
                     oldOnErrorHandler(message, source, lineno, colno, error);
67
                     oldOnErrorHandler(message, source, lineno, colno, error);
68
-            }
68
+            }.bind(this);
69
 
69
 
70
             // if an old handler exists also fire its events
70
             // if an old handler exists also fire its events
71
             var oldOnUnhandledRejection = window.onunhandledrejection;
71
             var oldOnUnhandledRejection = window.onunhandledrejection;
72
             window.onunhandledrejection = function(event) {
72
             window.onunhandledrejection = function(event) {
73
 
73
 
74
-                JitsiMeetJS.getGlobalOnErrorHandler(
74
+                this.getGlobalOnErrorHandler(
75
                     null, null, null, null, event.reason);
75
                     null, null, null, null, event.reason);
76
 
76
 
77
                 if(oldOnUnhandledRejection)
77
                 if(oldOnUnhandledRejection)
78
                     oldOnUnhandledRejection(event);
78
                     oldOnUnhandledRejection(event);
79
-            };
79
+            }.bind(this);
80
         }
80
         }
81
 
81
 
82
         return RTC.init(options || {});
82
         return RTC.init(options || {});

Loading…
Cancel
Save