mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1072814 - Emulate old Promise.defer() API for non-trivial cases r=yoric
This commit is contained in:
parent
5c7423bada
commit
d7d06deb0b
@ -337,7 +337,16 @@ let SessionStoreInternal = {
|
||||
_deferredInitialState: null,
|
||||
|
||||
// A promise resolved once initialization is complete
|
||||
_deferredInitialized: Promise.defer(),
|
||||
_deferredInitialized: (function () {
|
||||
let deferred = {};
|
||||
|
||||
deferred.promise = new Promise((resolve, reject) => {
|
||||
deferred.resolve = resolve;
|
||||
deferred.reject = reject;
|
||||
});
|
||||
|
||||
return deferred;
|
||||
})(),
|
||||
|
||||
// Whether session has been initialized
|
||||
_sessionInitialized: false,
|
||||
|
@ -63,7 +63,16 @@ consoleMsg.init(aMsg, aException.fileName, null, aException.lineNumber, 0, Ci.ns
|
||||
Services.console.logMessage(consoleMsg);
|
||||
}
|
||||
|
||||
let gOnceInitializedDeferred = Promise.defer();
|
||||
let gOnceInitializedDeferred = (function () {
|
||||
let deferred = {};
|
||||
|
||||
deferred.promise = new Promise((resolve, reject) => {
|
||||
deferred.resolve = resolve;
|
||||
deferred.reject = reject;
|
||||
});
|
||||
|
||||
return deferred;
|
||||
})();
|
||||
|
||||
/* :::::::: The Service ::::::::::::::: */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user