bug 1523104: remote: self-assign id to connection; r=ochameau

This commit is contained in:
Andreas Tolfsen 2019-03-07 22:14:59 +00:00
Родитель 47e6d0d14d
Коммит c889849aa3
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -10,10 +10,11 @@ const {Log} = ChromeUtils.import("chrome://remote/content/Log.jsm");
const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyGetter(this, "log", Log.get);
XPCOMUtils.defineLazyServiceGetter(this, "UUIDGen", "@mozilla.org/uuid-generator;1", "nsIUUIDGenerator");
class Connection {
constructor(connID, transport) {
this.id = connID;
constructor(transport) {
this.id = UUIDGen.generateUUID().toString();
this.transport = transport;
this.transport.hooks = this;