提交 0e738ab6 编写于 作者: E Eric Seidel

Make SkyShell stop crashing on scroll in Stocks2.

This is just another hack on top of the hack that is LayoutRoot.

We will want to untangle Document ownership further as we
iterate on LayoutRoot.  For now LayoutRoot is both very
inefficient (allocates a new Frame for each one!) as well
as crashy like this (by not actually owning the document
but rather grabbing it off the "rootElement" assigned to it).

This at least fixes this common crasher for now.
https://github.com/domokit/mojo/issues/206

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1171643002
上级 55882213
......@@ -37,6 +37,8 @@ LayoutRoot::LayoutRoot()
LayoutRoot::~LayoutRoot()
{
if (!m_document->needsAttach())
m_document->detach();
}
Element* LayoutRoot::rootElement() const
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册