Bug 1428694 - Bail out from PresShell::Initialize if the pres shell is being destroyed in XBLConstructorRunner. r=tnikkel

MozReview-Commit-ID: 86Rq18OdZnJ

--HG--
extra : rebase_source : e91dc8d39219789b85d74f87577f2b914d65158f
This commit is contained in:
Hiroyuki Ikezoe 2018-01-31 17:49:27 +09:00
Родитель ae2421fd8b
Коммит 3fe73a9c09
1 изменённых файлов: 3 добавлений и 0 удалений

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

@ -1826,6 +1826,9 @@ PresShell::Initialize(nscoord aWidth, nscoord aHeight)
// (Do this in a script runner, since our caller might have a script
// blocker on the stack.)
nsContentUtils::AddScriptRunner(new XBLConstructorRunner(mDocument));
// XBLConstructorRunner might destroy us.
NS_ENSURE_STATE(!mHaveShutDown);
}
NS_ASSERTION(rootFrame, "How did that happen?");