rem: var channel = linkChecker.baseRequest.QueryInterface(Components.interfaces.nsIChannel); 
add: var channel = linkChecker.baseChannel; 
context:   onStopRequest: function (aRequest, aContext, aStatus) {    try {      if (aStatus == 0) { // NS_BINDING_SUCCEEDED, so there's something there        var linkChecker = aRequest.QueryInterface(Components.interfaces.nsIURIChecker);        var channel = linkChecker.baseRequest.QueryInterface(Components.interfaces.nsIChannel);        this.contentType = channel.contentType;        try {          var httpChannel = channel.QueryInterface(Components.interfaces.nsIHttpChannel);          var encodedChannel = channel.QueryInterface(Components.interfaces.nsIEncodedChannel);          this.contentEncodingType = null;          // There may be content-encodings on the channel.  Multiple content          // encodings are allowed, eg "Content-Encoding: gzip, uuencode".  This          // header would mean that the content was first gzipped and then          // uuencoded.  The encoding enumerator returns MIME types          // corresponding to each encoding starting from the end, so the first          // thing it returns corresponds to the outermost encoding.          var encodingEnumerator = encodedChannel.contentEncodings;          if (encodingEnumerator && encodingEnumerator.hasMore()) {            try {              this.contentEncodingType = encodingEnumerator.getNext();            } catch (e) {            }          }          this.mContentDisposition = httpChannel.getResponseHeader("content-disposition");        }        catch (e) {        }        if (!this.contentType || this.contentType == "application/x-unknown-content-type") {          // We didn't get a type from the server.  Fall back on other type detection mechanisms          throw "Unknown Type";        }      }      else {        dump("Error saving link aStatus = 0x" + aStatus.toString(16) + "\n");        var bundle = getStringBundle();        var errorTitle = bundle.GetStringFromName("saveLinkErrorTitle");        var errorMsg = bundle.GetStringFromName("saveLinkErrorMsg");        const promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);        promptService.alert(this.mData.window, errorTitle, errorMsg);        return;      }    }    catch (e) {      if (this.mData.document) {        this.contentType = this.mData.document.contentType;      } else {        var type = getMIMETypeForURI(this.uri);        if (type)          this.contentType = type;      }    }    this.mCallback(this, this.mData);  },
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/582bc3f22cb265ad001b3bfed757187347849f02/contentAreaUtils.js/buggy/xpfe/communicator/resources/content/contentAreaUtils.js