mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
merge fx-team to mozilla-central a=merge
This commit is contained in:
commit
956c7532ac
@ -88,7 +88,7 @@
|
||||
class="syncTabsMenuItem subviewbutton"
|
||||
label="&syncTabsMenu3.label;"
|
||||
oncommand="BrowserOpenSyncTabs();"
|
||||
disabled="true"/>
|
||||
hidden="true"/>
|
||||
<toolbarbutton id="appMenuRestoreLastSession"
|
||||
label="&appMenuHistory.restoreSession.label;"
|
||||
class="subviewbutton"
|
||||
|
@ -739,6 +739,7 @@ var Impl = {
|
||||
try {
|
||||
// TODO: This should probably happen after all the delayed init here.
|
||||
this._initialized = true;
|
||||
TelemetryEnvironment.delayedInit();
|
||||
|
||||
yield TelemetrySend.setup(this._testMode);
|
||||
|
||||
|
@ -65,6 +65,10 @@ this.TelemetryEnvironment = {
|
||||
return getGlobal().onInitialized();
|
||||
},
|
||||
|
||||
delayedInit: function() {
|
||||
return getGlobal().delayedInit();
|
||||
},
|
||||
|
||||
registerChangeListener: function(name, listener) {
|
||||
return getGlobal().registerChangeListener(name, listener);
|
||||
},
|
||||
@ -664,6 +668,7 @@ function EnvironmentCache() {
|
||||
this._log.trace("constructor");
|
||||
|
||||
this._shutdown = false;
|
||||
this._delayedInitFinished = false;
|
||||
|
||||
// A map of listeners that will be called on environment changes.
|
||||
this._changeListeners = new Map();
|
||||
@ -740,6 +745,13 @@ EnvironmentCache.prototype = {
|
||||
return Promise.resolve(this.currentEnvironment);
|
||||
},
|
||||
|
||||
/**
|
||||
* This gets called when the delayed init completes.
|
||||
*/
|
||||
delayedInit: function() {
|
||||
this._delayedInitFinished = true;
|
||||
},
|
||||
|
||||
/**
|
||||
* Register a listener for environment changes.
|
||||
* @param name The name of the listener. If a new listener is registered
|
||||
@ -1304,6 +1316,7 @@ EnvironmentCache.prototype = {
|
||||
// We are already skipping change events in _checkChanges if there is a pending change task running.
|
||||
let now = Policy.now();
|
||||
if (this._lastEnvironmentChangeDate &&
|
||||
this._delayedInitFinished &&
|
||||
(CHANGE_THROTTLE_INTERVAL_MS >=
|
||||
(now.getTime() - this._lastEnvironmentChangeDate.getTime()))) {
|
||||
this._log.trace("_onEnvironmentChange - throttling changes, now: " + now +
|
||||
@ -1311,7 +1324,9 @@ EnvironmentCache.prototype = {
|
||||
return;
|
||||
}
|
||||
|
||||
this._lastEnvironmentChangeDate = now;
|
||||
if(this._delayedInitFinished) {
|
||||
this._lastEnvironmentChangeDate = now;
|
||||
}
|
||||
|
||||
for (let [name, listener] of this._changeListeners) {
|
||||
try {
|
||||
|
@ -653,6 +653,7 @@ function isRejected(promise) {
|
||||
|
||||
add_task(function* asyncSetup() {
|
||||
yield spoofProfileReset();
|
||||
TelemetryEnvironment.delayedInit();
|
||||
});
|
||||
|
||||
add_task(function* test_checkEnvironment() {
|
||||
|
@ -24,8 +24,9 @@ function check_event(event, id, data)
|
||||
}
|
||||
}
|
||||
|
||||
function* run_test()
|
||||
add_task(function* ()
|
||||
{
|
||||
do_get_profile();
|
||||
yield TelemetrySession.setup();
|
||||
|
||||
TelemetryLog.log(TEST_PREFIX + "1", ["val", 123, undefined]);
|
||||
@ -45,4 +46,4 @@ function* run_test()
|
||||
do_check_true(log[1][1] <= log[2][1]);
|
||||
|
||||
yield TelemetrySession.shutdown();
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user