mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 885389 - Make do_get_profile() optionally fire profile-after-change on completion. r=ted
This commit is contained in:
parent
4f3be5774a
commit
55058e0780
@ -1108,9 +1108,10 @@ function do_get_minidumpdir() {
|
||||
* Registers a directory with the profile service,
|
||||
* and return the directory as an nsILocalFile.
|
||||
*
|
||||
* @param notifyProfileAfterChange Whether to notify for "profile-after-change".
|
||||
* @return nsILocalFile of the profile directory.
|
||||
*/
|
||||
function do_get_profile() {
|
||||
function do_get_profile(notifyProfileAfterChange = false) {
|
||||
if (!runningInParent) {
|
||||
_testLogger.info("Ignoring profile creation from child process.");
|
||||
return null;
|
||||
@ -1173,6 +1174,9 @@ function do_get_profile() {
|
||||
if (!_profileInitialized) {
|
||||
obsSvc.notifyObservers(null, "profile-do-change", "xpcshell-do-get-profile");
|
||||
_profileInitialized = true;
|
||||
if (notifyProfileAfterChange) {
|
||||
obsSvc.notifyObservers(null, "profile-after-change", "xpcshell-do-get-profile");
|
||||
}
|
||||
}
|
||||
|
||||
// The methods of 'provider' will retain this scope so null out everything
|
||||
|
Loading…
Reference in New Issue
Block a user