mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 927038 - Using nsIUUIDGenerator rather than Date.now(). r=mbrubeck
This commit is contained in:
parent
7fc84d38a3
commit
1d5ba8c322
@ -9,6 +9,9 @@ let Cu = Components.utils;
|
||||
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(this, "gUUIDGenerator",
|
||||
"@mozilla.org/uuid-generator;1", "nsIUUIDGenerator");
|
||||
|
||||
let WebProgressListener = {
|
||||
_lastLocation: null,
|
||||
_firstPaint: false,
|
||||
@ -260,7 +263,7 @@ let WebNavigation = {
|
||||
// start might already be in use)
|
||||
let id = aIdMap[aEntry.ID] || 0;
|
||||
if (!id) {
|
||||
for (id = Date.now(); id in aIdMap.used; id++);
|
||||
id = gUUIDGenerator.generateUUID();
|
||||
aIdMap[aEntry.ID] = id;
|
||||
aIdMap.used[id] = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user