summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--toolkit/mozapps/extensions/internal/XPIProvider.jsm12
1 files changed, 4 insertions, 8 deletions
diff --git a/toolkit/mozapps/extensions/internal/XPIProvider.jsm b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
index 613903a44..76b4e653b 100644
--- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm
+++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
@@ -987,14 +987,10 @@ function loadManifestFromRDF(aUri, aStream) {
// Generate random GUID used for Sync.
// This was lifted from util.js:makeGUID() from services-sync.
- let rng = Cc["@mozilla.org/security/random-generator;1"].
- createInstance(Ci.nsIRandomGenerator);
- let bytes = rng.generateRandomBytes(9);
- let byte_string = [String.fromCharCode(byte) for each (byte in bytes)]
- .join("");
- // Base64 encode
- addon.syncGUID = btoa(byte_string).replace(/\+/g, '-')
- .replace(/\//g, '_');
+ let guid = Cc["@mozilla.org/uuid-generator;1"]
+ .getService(Ci.nsIUUIDGenerator)
+ .generateUUID().toString();
+ addon.syncGUID = guid;
return addon;
}