Backed out changeset 1f21bc9fc654 (bug 968793) for B2G xpcshell failures.
authorRyan VanderMeulen <ryanvm@gmail.com>
Fri, 14 Feb 2014 14:01:43 -0500
changeset 169349 205763e922a1e1474a516aee14ab7e1680b9e389
parent 169348 90d27c8d12235f27ac305556448e9dac51765fb4
child 169350 791b02552f5f3083a63ae72f99241fcd003857b0
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
bugs968793
milestone30.0a1
backs out1f21bc9fc654ac60d3698d21db9ffaa49be06a7d
Backed out changeset 1f21bc9fc654 (bug 968793) for B2G xpcshell failures.
dom/network/src/NetworkStatsDB.jsm
--- a/dom/network/src/NetworkStatsDB.jsm
+++ b/dom/network/src/NetworkStatsDB.jsm
@@ -74,25 +74,17 @@ NetworkStatsDB.prototype = {
         // In order to support per-app traffic data storage, the original
         // objectStore needs to be replaced by a new objectStore with new
         // key path ("appId") and new index ("appId").
         // Also, since now networks are identified by their
         // [networkId, networkType] not just by their connectionType,
         // to modify the keyPath is mandatory to delete the object store
         // and create it again. Old data is going to be deleted because the
         // networkId for each sample can not be set.
-
-        // In version 1.2 objectStore name was 'net_stats_v2', to avoid errors when
-        // upgrading from 1.2 to 1.3 objectStore name should be checked.
-        let stores = db.objectStoreNames;
-        if(stores.contains("net_stats_v2")) {
-          db.deleteObjectStore("net_stats_v2");
-        } else {
-          db.deleteObjectStore(STATS_STORE_NAME);
-        }
+        db.deleteObjectStore(DEPRECATED_STORE_NAME);
 
         objectStore = db.createObjectStore(DEPRECATED_STORE_NAME, { keyPath: ["appId", "network", "timestamp"] });
         objectStore.createIndex("appId", "appId", { unique: false });
         objectStore.createIndex("network", "network", { unique: false });
         objectStore.createIndex("networkType", "networkType", { unique: false });
         objectStore.createIndex("timestamp", "timestamp", { unique: false });
         objectStore.createIndex("rxBytes", "rxBytes", { unique: false });
         objectStore.createIndex("txBytes", "txBytes", { unique: false });