зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1342927 - Add a hidden pref to disable force painting of tabs so that browser_tabSpinnerProbe.js can pass. r=billm
MozReview-Commit-ID: 4q2dSBmvVV9 --HG-- extra : rebase_source : 70fcc277918498fa71046b9d57419781be55bcf8
This commit is contained in:
Родитель
5aa259a41e
Коммит
18c1bb6eaa
|
@ -85,7 +85,15 @@ function* testProbe(aProbe) {
|
|||
|
||||
add_task(function* setup() {
|
||||
yield SpecialPowers.pushPrefEnv({
|
||||
set: [["dom.ipc.processCount", 1]]
|
||||
set: [
|
||||
["dom.ipc.processCount", 1],
|
||||
// We can interrupt JS to paint now, which is great for
|
||||
// users, but bad for testing spinners. We temporarily
|
||||
// disable that feature for this test so that we can
|
||||
// easily get ourselves into a predictable tab spinner
|
||||
// state.
|
||||
["browser.tabs.remote.force-paint", false],
|
||||
]
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -275,8 +275,12 @@ private:
|
|||
nsDataHashtable<nsUint32HashKey, nsString> mBrowserCrashDumpIds;
|
||||
Mutex mBrowserCrashDumpHashLock;
|
||||
mozilla::ipc::TaskFactory<HangMonitorParent> mMainThreadTaskFactory;
|
||||
|
||||
static bool sShouldForcePaint;
|
||||
};
|
||||
|
||||
bool HangMonitorParent::sShouldForcePaint = true;
|
||||
|
||||
} // namespace
|
||||
|
||||
/* HangMonitorChild implementation */
|
||||
|
@ -575,6 +579,13 @@ HangMonitorParent::HangMonitorParent(ProcessHangMonitor* aMonitor)
|
|||
{
|
||||
MOZ_RELEASE_ASSERT(NS_IsMainThread());
|
||||
mReportHangs = mozilla::Preferences::GetBool("dom.ipc.reportProcessHangs", false);
|
||||
|
||||
static bool sInited = false;
|
||||
if (!sInited) {
|
||||
sInited = true;
|
||||
Preferences::AddBoolVarCache(&sShouldForcePaint,
|
||||
"browser.tabs.remote.force-paint", true);
|
||||
}
|
||||
}
|
||||
|
||||
HangMonitorParent::~HangMonitorParent()
|
||||
|
@ -632,9 +643,11 @@ void
|
|||
HangMonitorParent::ForcePaint(dom::TabParent* aTab, uint64_t aLayerObserverEpoch)
|
||||
{
|
||||
MOZ_RELEASE_ASSERT(NS_IsMainThread());
|
||||
TabId id = aTab->GetTabId();
|
||||
MonitorLoop()->PostTask(NewNonOwningRunnableMethod<TabId, uint64_t>(
|
||||
this, &HangMonitorParent::ForcePaintOnThread, id, aLayerObserverEpoch));
|
||||
if (sShouldForcePaint) {
|
||||
TabId id = aTab->GetTabId();
|
||||
MonitorLoop()->PostTask(NewNonOwningRunnableMethod<TabId, uint64_t>(
|
||||
this, &HangMonitorParent::ForcePaintOnThread, id, aLayerObserverEpoch));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Загрузка…
Ссылка в новой задаче