Index: chrome/content/ui/sendReport.js |
=================================================================== |
--- a/chrome/content/ui/sendReport.js |
+++ b/chrome/content/ui/sendReport.js |
@@ -376,17 +376,17 @@ let screenshotDataSource = |
this._context.lineJoin = "round"; |
// Reduce colors asynchronously |
this._pixelData = this._context.getImageData(this.imageOffset, this.imageOffset, |
this._canvas.width - this.imageOffset * 2, |
this._canvas.height - this.imageOffset * 2); |
this._max = this._pixelData.width * this._pixelData.height * 4; |
this._i = 0; |
- Utils.threadManager.currentThread.dispatch(this, Ci.nsIEventTarget.DISPATCH_NORMAL); |
+ Utils.runAsync(this.run.bind(this)); |
}, |
run: function() |
{ |
// Process only 5000 bytes at a time to prevent browser hangs |
let endIndex = Math.min(this._i + 5000, this._max); |
let i = this._i; |
for (; i < endIndex; i++) |
@@ -396,17 +396,17 @@ let screenshotDataSource = |
{ |
// Save data back and we are done |
this._context.putImageData(this._pixelData, this.imageOffset, this.imageOffset); |
this._callback(); |
} |
else |
{ |
this._i = i; |
- Utils.threadManager.currentThread.dispatch(this, Ci.nsIEventTarget.DISPATCH_NORMAL); |
+ Utils.runAsync(this.run.bind(this)); |
} |
}, |
get enabled() this._enabled, |
set enabled(enabled) |
{ |
if (this._enabled == enabled) |
return; |