Bug 1273314 - Log the caught error properly in CaptureStreamHelper. r?jib draft
authorAndreas Pehrson <pehrsons@gmail.com>
Fri, 30 Sep 2016 17:24:43 +0200
changeset 421532 0d575da6d16f3241f6fc648070fd52baacead6db
parent 420990 ea104eeb14cc54da9a06c3766da63f73117723a0
child 421533 222fceefde5a03cc14c3a1078431919004de0460
push id31542
push userbmo:pehrson@telenordigital.com
push dateThu, 06 Oct 2016 12:07:08 +0000
reviewersjib
bugs1273314
milestone52.0a1
Bug 1273314 - Log the caught error properly in CaptureStreamHelper. r?jib MozReview-Commit-ID: 9T8G4Xyw69t
dom/canvas/test/captureStream_common.js
--- 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);