mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-10 17:24:29 +00:00
Bug 1037729 - Moving callbacks to run after reaching steady state. r=jib
This commit is contained in:
parent
bc2e859932
commit
8712497a35
@ -358,14 +358,16 @@ RTCPeerConnection.prototype = {
|
||||
|
||||
callCB: function(callback, arg) {
|
||||
if (callback) {
|
||||
try {
|
||||
callback(arg);
|
||||
} catch(e) {
|
||||
// A content script (user-provided) callback threw an error. We don't
|
||||
// want this to take down peerconnection, but we still want the user
|
||||
// to see it, so we catch it, report it, and move on.
|
||||
this.logErrorAndCallOnError(e.message, e.fileName, e.lineNumber);
|
||||
}
|
||||
this._win.setTimeout(() => {
|
||||
try {
|
||||
callback(arg);
|
||||
} catch(e) {
|
||||
// A content script (user-provided) callback threw an error. We don't
|
||||
// want this to take down peerconnection, but we still want the user
|
||||
// to see it, so we catch it, report it, and move on.
|
||||
this.logErrorAndCallOnError(e.message, e.fileName, e.lineNumber);
|
||||
}
|
||||
}, 0);
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user