mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-12 18:50:08 +00:00
Bug 1091851 - Fix a race condition in Sqlite.jsm shutdown. r=mak
--HG-- extra : rebase_source : 5127daecf96c3aaebc60f15a4b713273cee5e78f
This commit is contained in:
parent
89fee48aee
commit
b0ba024008
@ -442,7 +442,6 @@ ConnectionData.prototype = Object.freeze({
|
||||
// necessarily at the mozStorage-level.
|
||||
let markAsClosed = () => {
|
||||
this._log.info("Closed");
|
||||
this._dbConn = null;
|
||||
// Now that the connection is closed, no need to keep
|
||||
// a blocker for Barriers.connections.
|
||||
Barriers.connections.client.removeBlocker(this._deferredClose.promise);
|
||||
@ -450,10 +449,12 @@ ConnectionData.prototype = Object.freeze({
|
||||
}
|
||||
if (wrappedConnections.has(this._identifier)) {
|
||||
wrappedConnections.delete(this._identifier);
|
||||
this._dbConn = null;
|
||||
markAsClosed();
|
||||
} else {
|
||||
this._log.debug("Calling asyncClose().");
|
||||
this._dbConn.asyncClose(markAsClosed);
|
||||
this._dbConn = null;
|
||||
}
|
||||
return this._deferredClose.promise;
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user