Bug 1273314 - Log the caught error properly in CaptureStreamHelper. r?jib
MozReview-Commit-ID: 9T8G4Xyw69t
--- a/dom/canvas/test/captureStream_common.js
+++ b/dom/canvas/test/captureStream_common.js
@@ -116,18 +116,18 @@ CaptureStreamTestHelper.prototype = {
*/
waitForPixel: function (video, offsetX, offsetY, test, timeout, width, height) {
return new Promise(resolve => {
const startTime = video.currentTime;
var ontimeupdate = () => {
var pixelMatch = false;
try {
pixelMatch = test(this.getPixel(video, offsetX, offsetY, width, height));
- } catch (NS_ERROR_NOT_AVAILABLE) {
- info("Waiting for pixel but no video available");
+ } catch (e) {
+ info("Waiting for pixel but no video available: " + e + "\n" + e.stack);
}
if (!pixelMatch &&
(!timeout || video.currentTime < startTime + (timeout / 1000.0))) {
// No match yet and,
// No timeout (waiting indefinitely) or |timeout| has not passed yet.
return;
}
video.removeEventListener("timeupdate", ontimeupdate);