Bug 489021 - Strict Warning: reference to undefined property aIdMap.used[id]. r=dietrich
authorSimon Bünzli <zeniko@gmail.com>
Wed, 22 Apr 2009 17:59:48 +0200
changeset 27625 ae0bb6ca4aa24f1a9d8541770dacd949bcec48fa
parent 27624 73c343da891cc858fb684ee33f386a31972e1804
child 27626 5267ab4402c90a0824148644d5a4b0fde38d70de
push id6660
push userdgottwald@mozilla.com
push dateWed, 22 Apr 2009 16:06:37 +0000
treeherdermozilla-central@ae0bb6ca4aa2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdietrich
bugs489021
milestone1.9.2a1pre
Bug 489021 - Strict Warning: reference to undefined property aIdMap.used[id]. r=dietrich
browser/components/sessionstore/src/nsSessionStore.js
--- a/browser/components/sessionstore/src/nsSessionStore.js
+++ b/browser/components/sessionstore/src/nsSessionStore.js
@@ -1971,17 +1971,17 @@ SessionStoreService.prototype = {
       shEntry.cacheKey = cacheKey;
     }
 
     if (aEntry.ID) {
       // get a new unique ID for this frame (since the one from the last
       // start might already be in use)
       var id = aIdMap[aEntry.ID] || 0;
       if (!id) {
-        for (id = Date.now(); aIdMap.used[id]; id++);
+        for (id = Date.now(); id in aIdMap.used; id++);
         aIdMap[aEntry.ID] = id;
         aIdMap.used[id] = true;
       }
       shEntry.ID = id;
     }
     
     if (aEntry.scroll) {
       var scrollPos = (aEntry.scroll || "0,0").split(",");