mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 908923 - Part 2: Add a button to dump the entire rlog ringbuffer to about:webrtc. r=abr
This commit is contained in:
parent
c2c5f8c8b3
commit
098cdd266f
@ -171,14 +171,17 @@ WebrtcGlobalInformation.prototype = {
|
||||
}
|
||||
},
|
||||
|
||||
getCandPairLogs: function(candPairId, callback, errorCallback) {
|
||||
let pattern = 'CAND-PAIR(' + candPairId + ')';
|
||||
getLogs: function(pattern, callback, errorCallback) {
|
||||
if (_globalPCList) {
|
||||
_globalPCList.getLoggingFromFirstPC(pattern, callback, errorCallback);
|
||||
} else {
|
||||
errorCallback("No global PeerConnection list");
|
||||
}
|
||||
},
|
||||
|
||||
getCandPairLogs: function(candPairId, callback, errorCallback) {
|
||||
this.getLogs('CAND-PAIR(' + candPairId + ')', callback, errorCallback);
|
||||
},
|
||||
};
|
||||
|
||||
function RTCIceCandidate() {
|
||||
|
@ -150,6 +150,9 @@ interface WebrtcGlobalInformation {
|
||||
void getCandPairLogs(DOMString candPairId,
|
||||
RTCLogCallback callback,
|
||||
RTCPeerConnectionErrorCallback errorCallback);
|
||||
void getLogs(DOMString pattern,
|
||||
RTCLogCallback callback,
|
||||
RTCPeerConnectionErrorCallback errorCallback);
|
||||
};
|
||||
|
||||
|
||||
|
@ -24,6 +24,15 @@ function getCandPairLogs(id) {
|
||||
}
|
||||
}
|
||||
|
||||
function getAllLogs() {
|
||||
try {
|
||||
var wg = new WebrtcGlobalInformation();
|
||||
wg.getLogs('', displayLogs, console.log);
|
||||
} catch(e) {
|
||||
console.log("Exception while creating WebrtcGlobalInformation" + e.toString());
|
||||
}
|
||||
}
|
||||
|
||||
function displayLogs(logs) {
|
||||
var logsDiv = document.getElementById('logs');
|
||||
while (logsDiv.lastChild) {
|
||||
@ -34,7 +43,7 @@ function displayLogs(logs) {
|
||||
logs.forEach(function(logLine){
|
||||
logsDiv.appendChild(document.createElement('div'))
|
||||
.appendChild(document.createTextNode(logLine));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function buildCandPairTableRow(candPair, stats) {
|
||||
@ -214,6 +223,7 @@ var statsDisplay = setInterval(refreshStats, 1000);
|
||||
<body id="body" onload="refreshStats()">
|
||||
<div id="stats">
|
||||
</div>
|
||||
<button onclick="getAllLogs()">Show/refresh logging</button>
|
||||
<div id="logs">
|
||||
</div>
|
||||
</body>
|
||||
|
Loading…
Reference in New Issue
Block a user