Backed out changeset c2c0405ddf93 (bug 1180916) for causing various e10s mochitest failures.

This commit is contained in:
Ryan VanderMeulen 2015-08-14 11:27:25 -04:00
Родитель b67d87ab04
Коммит a977d011fb
3 изменённых файлов: 1 добавлений и 70 удалений

Просмотреть файл

@ -3086,29 +3086,6 @@
STATE_LOADED: 2,
STATE_UNLOADING: 3,
_suppressor: {
_dwu: null,
_count: 0,
init: function() {
this._dwu = window.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindowUtils);
},
destroy: function() {
while (this._count > 0) {
this.unsuppress();
}
this._dwu = null;
},
suppress: function() {
this._dwu.suppressPaintingGlobally();
this._count++;
},
unsuppress: function() {
this._dwu.unsuppressPaintingGlobally();
this._count--;
}
},
getTabState: function(tab) {
let state = this.tabState.get(tab);
if (state === undefined) {
@ -3145,7 +3122,6 @@
window.addEventListener("MozLayerTreeCleared", this);
window.addEventListener("TabRemotenessChange", this);
this.setTabState(this.requestedTab, this.STATE_LOADED);
this._suppressor.init();
},
destroy: function() {
@ -3156,7 +3132,6 @@
window.removeEventListener("MozLayerTreeReady", this);
window.removeEventListener("MozLayerTreeCleared", this);
window.removeEventListener("TabRemotenessChange", this);
this._suppressor.destroy();
this.tabbrowser._switcher = null;
},
@ -3269,11 +3244,7 @@
// loadingTab can be non-null here if we timed out loading the current tab.
// In that case we just overwrite it with a different tab; it's had its chance.
if (this.loadingTab == null) {
this._suppressor.suppress();
}
this.loadingTab = this.requestedTab;
this.log("Loading tab " + this.tinfo(this.loadingTab));
this.setTabState(this.requestedTab, this.STATE_LOADING);
@ -3406,7 +3377,6 @@
clearTimeout(this.loadTimer);
this.loadTimer = null;
this.loadingTab = null;
this._suppressor.unsuppress();
}
},

Просмотреть файл

@ -3119,34 +3119,6 @@ nsDOMWindowUtils::GetPaintingSuppressed(bool *aPaintingSuppressed)
return NS_OK;
}
NS_IMETHODIMP
nsDOMWindowUtils::SuppressPaintingGlobally()
{
NS_ENSURE_TRUE(nsContentUtils::IsCallerChrome(), NS_ERROR_FAILURE);
nsPresContext* presContext = GetPresContext();
if (!presContext) {
return NS_ERROR_FAILURE;
}
presContext->GetRootPresContext()->RefreshDriver()->Freeze();
return NS_OK;
}
NS_IMETHODIMP
nsDOMWindowUtils::UnsuppressPaintingGlobally()
{
NS_ENSURE_TRUE(nsContentUtils::IsCallerChrome(), NS_ERROR_FAILURE);
nsPresContext* presContext = GetPresContext();
if (!presContext) {
return NS_ERROR_FAILURE;
}
presContext->GetRootPresContext()->RefreshDriver()->Thaw();
return NS_OK;
}
NS_IMETHODIMP
nsDOMWindowUtils::GetPlugins(JSContext* cx, JS::MutableHandle<JS::Value> aPlugins)
{

Просмотреть файл

@ -49,7 +49,7 @@ interface nsIJSRAIIHelper;
interface nsIContentPermissionRequest;
interface nsIObserver;
[scriptable, uuid(5c4c391c-e083-4d95-95f0-5820c8308445)]
[scriptable, uuid(6064615a-a782-4d08-86db-26ef3851208a)]
interface nsIDOMWindowUtils : nsISupports {
/**
@ -1607,17 +1607,6 @@ interface nsIDOMWindowUtils : nsISupports {
*/
readonly attribute boolean paintingSuppressed;
/**
* Suppress painting by freezing the refresh driver.
**/
void suppressPaintingGlobally();
/**
* Unsuppress painting by thawing the refresh driver.
**/
void unsuppressPaintingGlobally();
/**
* Returns an array of plugins on the page for opt-in activation.
*