diff options
author | Ben Murdoch <benm@google.com> | 2010-06-18 16:15:07 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2010-06-18 17:16:09 +0100 |
commit | 65d588dc023f5bec4993176b63665f8e447e01c6 (patch) | |
tree | a71a1aa6fe23fd21cf62abcade3b80d37c6107b9 /WebCore/rendering/RenderBlockLineLayout.cpp | |
parent | c9aa5a757b642000cb31e7c568af58ec11b95883 (diff) | |
download | external_webkit-65d588dc023f5bec4993176b63665f8e447e01c6.zip external_webkit-65d588dc023f5bec4993176b63665f8e447e01c6.tar.gz external_webkit-65d588dc023f5bec4993176b63665f8e447e01c6.tar.bz2 |
Fix layout test crash: fast/replaced/frame-removed-during-resize.html
Fix b/2780565
Change-Id: I4956206dfbfaebd44414adaea7ab80e2c2fd4d1b
Diffstat (limited to 'WebCore/rendering/RenderBlockLineLayout.cpp')
-rw-r--r-- | WebCore/rendering/RenderBlockLineLayout.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/WebCore/rendering/RenderBlockLineLayout.cpp b/WebCore/rendering/RenderBlockLineLayout.cpp index 2cf3865..a78da2b 100644 --- a/WebCore/rendering/RenderBlockLineLayout.cpp +++ b/WebCore/rendering/RenderBlockLineLayout.cpp @@ -622,7 +622,22 @@ void RenderBlock::layoutInlineChildren(bool relayoutChildren, int& repaintTop, i else if (fullLayout || o->needsLayout()) // Replaced elements toRenderBox(o)->dirtyLineBoxes(fullLayout); +#if defined(ANDROID_FLATTEN_IFRAME) || defined(ANDROID_FLATTEN_FRAMESET) + // Android frame flattening during layout() may cause the + // renderer to be destroyed, if for example a frames onresize handler + // deletes the frame - see http://trac.webkit.org/changeset/61070 for example. + // We may be able to remove this protector when we switch to the upstream + // frame flattening code. + RefPtr<Node> protector(o->node()); +#endif o->layoutIfNeeded(); +#if defined(ANDROID_FLATTEN_IFRAME) || defined(ANDROID_FLATTEN_FRAMESET) + // Ensure that the renderer still exists. If it's gone away we will crash pretty + // fast by continuing to use the now invalid o pointer. If the renderer has gone, + // then there's no point in continuing to try to layout it's children so we break. + if (!protector->renderer()) + break; +#endif } } else if (o->isText() || (o->isRenderInline() && !endOfInline)) { hasInlineChild = true; |