       idx += 4
     false
 
-  image_abort_event: (e) ->
+  image_abort_event: (e) =>
     @completed
       success: false
       aborted: true
     return
 
   # This happens on normal errors, usually because the file isn't a supported image.
-  image_error_event: (e) ->
+  image_error_event: (e) =>
     @completed success: false
     return
 

    e.stop()
    if @similar
      @similar.destroy()
    @similar = new ThumbnailUserImage(file, @complete.bind(this))
    return

  # Submit a post/similar request using the image currently in the canvas.
  complete: (result) ->
    if result.chromeFailure
      notice 'The image failed to load; submitting normally...'
      @force_file = @file

    @image = image_pool.get()
    @onComplete = onComplete
    @url = URL.createObjectURL(@file)
    @image.on 'load', @image_load_event
    @image.on 'abort', @image_abort_event
    @image.on 'error', @image_error_event
    document.documentElement.addClassName 'progress'
    @image.src = @url
    return
