Bug 632497 - Use a content-type hint for asyncFetch in AutoCompleteCache (bustage fix)
authorMatt Brubeck <mbrubeck@mozilla.com>
Tue, 08 Feb 2011 13:58:55 -0800
changeset 67355 e1f202598b618cd5a219df617d69374904798427
parent 67354 24f4ba6d3672c9e6be7c8b79f79380cb29efba8b
child 67356 a8d1f77f84b114274c26abf520e4dc6ae44eacb1
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs632497
Bug 632497 - Use a content-type hint for asyncFetch in AutoCompleteCache (bustage fix)
mobile/components/AutoCompleteCache.js
--- a/mobile/components/AutoCompleteCache.js
+++ b/mobile/components/AutoCompleteCache.js
@@ -197,17 +197,17 @@ var AutoCompleteUtils = {
 
   loadCache: function loadCache() {
     if (!this.cacheFile.exists())
       return;
 
     try {
       let self = this;
       let channel = NetUtil.newChannel(this.cacheFile);
-      channel.setContentType("application/json");
+      channel.contentType = "application/json";
       NetUtil.asyncFetch(channel, function(aInputStream, aResultCode) {
         if (Components.isSuccessCode(aResultCode)) {
           let cache = Cc["@mozilla.org/dom/json;1"].createInstance(Ci.nsIJSON).
                       decodeFromStream(aInputStream, aInputStream.available());
 
           if (cache.version != CACHE_VERSION) {
             self.fetch(self.query);
             return;