mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1073259 - Print more descriptive errors when SettingsManager tries to make a request with an invalid window. r=bent
This commit is contained in:
parent
41e66a285c
commit
ee719e8f3c
@ -86,14 +86,6 @@ SettingsLock.prototype = {
|
||||
|
||||
_closeHelper: function() {
|
||||
if (DEBUG) debug("closing lock " + this._id);
|
||||
// sendMessage can get queued to run later in a thread via
|
||||
// _closeHelper, but the SettingsManager may have died in between
|
||||
// the time it was scheduled and the time it runs. Make sure our
|
||||
// window is valid before sending, otherwise just ignore.
|
||||
if (!this._settingsManager._window) {
|
||||
if (DEBUG) debug("SettingsManager died, cannot send " + aMessageName + " message window principal.");
|
||||
return;
|
||||
}
|
||||
this._open = false;
|
||||
this._closeCalled = false;
|
||||
if (!this._requests || Object.keys(this._requests).length == 0) {
|
||||
@ -112,6 +104,18 @@ SettingsLock.prototype = {
|
||||
},
|
||||
|
||||
sendMessage: function(aMessageName, aData) {
|
||||
// sendMessage can be called after our window has died, or get
|
||||
// queued to run later in a thread via _closeHelper, but the
|
||||
// SettingsManager may have died in between the time it was
|
||||
// scheduled and the time it runs. Make sure our window is valid
|
||||
// before sending, otherwise just ignore.
|
||||
if (!this._settingsManager._window) {
|
||||
Cu.reportError(
|
||||
"SettingsManager window died, cannot run settings transaction." +
|
||||
" SettingsMessage: " + aMessageName +
|
||||
" SettingsData: " + JSON.stringify(aData));
|
||||
return;
|
||||
}
|
||||
cpmm.sendAsyncMessage(aMessageName,
|
||||
aData,
|
||||
undefined,
|
||||
|
Loading…
Reference in New Issue
Block a user