Changeset 601

Show
Ignore:
Timestamp:
01/13/08 19:56:16 (11 months ago)
Author:
boo..@youngpup.net
Message:

Make version checking work with versions with letters in them, such as 3.0b2.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/0.7/src/chrome/chromeFiles/content/xmlhttprequester.js

    r597 r601  
    8787  } 
    8888 
    89   // Always allow cookies for FF3 
     89  // XPCSafeJSObjectWrapper was introduced in Gecko 1.9 and made cross-domain 
     90  // XHR with cookies OK. 
    9091  var appInfo = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULAppInfo); 
    91   var versionChecker = Cc["@mozilla.org/xpcom/version-comparator;1"] 
    92                          .getService(Ci.nsIVersionComparator); 
    93   if(versionChecker.compare(appInfo.version, "3.0") >= 0) { 
     92 
     93  // nsIVersionComparator doesn't seem to work when the version numbers have 
     94  // letters in them. 
     95  var version = appInfo.platformVersion.split("."); 
     96  if (parseInt(version[0]) >= 1 && parseInt(version[1]) >= 9) { 
    9497    return; 
    9598  }