Bug 645092 - Stop using [deprecated] Storage methods (testpilot) [r=mark.finkle]
authorJono X <jdicarlo@mozilla.com>
Mon, 11 Apr 2011 22:30:44 -0400
changeset 67887 8929076380f48c28cbea5a0dfe601eda848a82b1
parent 67886 071b5fff3154d1cba421d0de6c60d04c220581de
child 67888 7a8f522fc75ad4228a8abda1a0e14ae7abf9a643
push idunknown
push userunknown
push dateunknown
reviewersmark
bugs645092
milestone2.2a1pre
Bug 645092 - Stop using [deprecated] Storage methods (testpilot) [r=mark.finkle]
browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/experiment_data_store.js
--- a/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/experiment_data_store.js
+++ b/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/experiment_data_store.js
@@ -114,24 +114,21 @@ ExperimentDataStore.prototype = {
       columnNumbers.push( "?" + i);
     }
     let insertSql = "INSERT INTO " + this._tableName + " VALUES (";
     insertSql += columnNumbers.join(", ") + ")";
     let insStmt = this._createStatement(insertSql);
     for (i = 0; i < this._columns.length; i++) {
       let datum =  uiEvent[this._columns[i].property];
       switch (this._columns[i].type) {
-        case TYPE_INT_32:
-          insStmt.bindInt32Parameter(i, datum);
-        break;
-        case TYPE_DOUBLE:
-          insStmt.bindDoubleParameter(i, datum);
+        case TYPE_INT_32: case TYPE_DOUBLE:
+          insStmt.params[i] = datum;
         break;
         case TYPE_STRING:
-          insStmt.bindUTF8StringParameter(i, sanitizeString(datum));
+          insStmt.params[i] = sanitizeString(datum);
         break;
       }
     }
     insStmt.executeAsync({
       handleResult: function(aResultSet) {
       },
       handleError: function(aError) {
         if (callback) {