Bug 1312888 - Fix incorrect debug output for V2 lists. r?hchang draft
authorDimiL <dlee@mozilla.com>
Wed, 14 Jun 2017 15:32:53 +0800
changeset 593863 adc2c959c503281b19d3728e7e203e14837f8c2b
parent 592321 042829191d730dd6e901d09fb62bbf4274fe5895
child 633243 8fc2f735d9331212cd6e446d23879754ca1aa191
push id63841
push userbmo:dlee@mozilla.com
push dateWed, 14 Jun 2017 07:36:01 +0000
reviewershchang
bugs1312888
milestone55.0a1
Bug 1312888 - Fix incorrect debug output for V2 lists. r?hchang MozReview-Commit-ID: A6tb38RnUN3
toolkit/components/url-classifier/content/listmanager.js
--- a/toolkit/components/url-classifier/content/listmanager.js
+++ b/toolkit/components/url-classifier/content/listmanager.js
@@ -395,20 +395,22 @@ PROT_ListManager.prototype.makeUpdateReq
     // Build the <tablename, stateBase64> mapping.
     let tableState = {};
     tableData.split("\n").forEach(line => {
       let p = line.indexOf(";");
       if (-1 === p) {
         return;
       }
       let tableName = line.substring(0, p);
-      let metadata = line.substring(p + 1).split(":");
-      let stateBase64 = metadata[0];
-      log(tableName + " ==> " + stateBase64);
-      tableState[tableName] = stateBase64;
+      if (tableName in streamerMap.tableNames) {
+        let metadata = line.substring(p + 1).split(":");
+        let stateBase64 = metadata[0];
+        log(tableName + " ==> " + stateBase64);
+        tableState[tableName] = stateBase64;
+      }
     });
 
     // The state is a byte stream which server told us from the
     // last table update. The state would be used to do the partial
     // update and the empty string means the table has
     // never been downloaded. See Bug 1287058 for supporting
     // partial update.
     let stateArray = [];