Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
else
err = new DomainError("Closing.");
reject(err);
return;
}
//----
// CONNECTOR
//----
try
{
// PREPARE MEMBERS
this.state_ = SharedWorkerConnector.State.CONNECTING;
this.args_ = args;
this.connector_ = new Pair(resolve, reject);
// DO CONNECT
let worker = new SharedWorker(jsFile);
this.port_ = worker.port;
this.port_.onmessage = this._Handle_message.bind(this);
this.port_.start();
}
catch (exp)
{
this.state_ = SharedWorkerConnector.State.NONE;
reject(exp);
}
});
}