mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 16:22:00 +00:00
Bug 979627 - add more debug information to opening of data channels. r=bwc
This commit is contained in:
parent
659d8e76fa
commit
4851ed7121
@ -1303,6 +1303,8 @@ DataChannelTest.prototype = Object.create(PeerConnectionTest.prototype, {
|
||||
is(channel.readyState, "open", peer + " dataChannels[0] switched to state: 'open'");
|
||||
dcOpened = true;
|
||||
onSuccess();
|
||||
} else {
|
||||
info("dataChannelConnected() called, but data channel was open already");
|
||||
}
|
||||
}
|
||||
|
||||
@ -2606,11 +2608,12 @@ PeerConnectionWrapper.prototype = {
|
||||
* Callback to execute when the data channel has been opened
|
||||
*/
|
||||
registerDataChannelOpenEvents : function (onDataChannelOpened) {
|
||||
info(this + ": Register callbacks for 'ondatachannel' and 'onopen'");
|
||||
info(this + ": Register callback for 'ondatachannel'");
|
||||
|
||||
this.ondatachannel = function (targetChannel) {
|
||||
targetChannel.onopen = onDataChannelOpened;
|
||||
this.dataChannels.push(targetChannel);
|
||||
info(this + ": 'ondatachannel' fired, registering 'onopen' callback");
|
||||
targetChannel.onopen = onDataChannelOpened;
|
||||
};
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user