context: Image.prototype.update = function(data) {   if (data.uploadError) {      // looks like the file uploaded has exceeded uploadLimit ...      throw Error(gettext("Oy, this file is exceeding the upload limit. Please try to decrease its size."));   }         var upload = data.file_upload;   if (!upload && data.url && data.url !== this.url) {      this.url = data.url;      upload = getURL(data.url);   }   if (upload && upload.contentLength > 0) {      if (!Image.validateType(upload.contentType)) {         throw Error(gettext("Unrecognized file extension. Are you sure this is an image?"));      }            this.name || (this.name = this.getAccessName(data.name || upload.name));      this.contentLength = upload.contentLength;      this.contentType = upload.contentType;      var file = this.getFile();      var image = Image.writeToFile(upload, file,             data.maxWidth, data.maxHeight);      this.width = image.width;      this.height = image.height;      if (this.width > Image.THUMBNAILWIDTH) {         file = this.getThumbnailFile();         image = Image.writeToFile(upload, file,                Image.THUMBNAILWIDTH);         this.thumbnailName = file.getName();         this.thumbnailWidth = image.width;          this.thumbnailHeight = image.height;       }   } else if (this.isTransient()) {      throw Error(gettext("There was nothing to upload. Please be sure to choose a file."));   }   this.description = data.description;   this.touch();   // FIXME: Don't set the tags of the image via Story.prototype.setTags   //Story.prototype.setTags.call(this, data.tags || data.tags_array);    return;};
meta: 993	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/993/3efbd63046d0de34a59bbe00c11a37b157f1b745/Image.js/buggy/code/Image/Image.js