Bug 1092384 - Use undefined windowID for service locks r=bent

Service locks for settings are locks created from chrome code and not
attached to any window. Since the windowID is used in other cases for
the Settings:CreateLock message, we should at least pass an undefined
value to avoid unneccessary JS warning.
This commit is contained in:
Alexandre Lissy 2014-11-04 15:08:37 -08:00
parent b98674a5b6
commit c9497fd809

View File

@ -60,7 +60,12 @@ function SettingsServiceLock(aSettingsService, aTransactionCallback) {
cpmm.addMessageListener(msgs[msg], this); cpmm.addMessageListener(msgs[msg], this);
} }
cpmm.sendAsyncMessage("Settings:CreateLock", {lockID: this._id, isServiceLock: true}, undefined, Services.scriptSecurityManager.getSystemPrincipal()); cpmm.sendAsyncMessage("Settings:CreateLock",
{ lockID: this._id,
isServiceLock: true,
windowID: undefined },
undefined,
Services.scriptSecurityManager.getSystemPrincipal());
Services.tm.currentThread.dispatch(closeHelper, Ci.nsIThread.DISPATCH_NORMAL); Services.tm.currentThread.dispatch(closeHelper, Ci.nsIThread.DISPATCH_NORMAL);
} }