diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index 14c8e9e906..460949e0fe 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -1771,6 +1771,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?");