Skip to content
Permalink
Browse files
2010-07-21 Finnur Thorarinsson <finnur.webkit@gmail.com>
        Reviewed by Dimitri Glazkov.

        Avoid crashing during find-in-page when |view| is NULL.
        https://bugs.webkit.org/show_bug.cgi?id=42760

        There are no layout tests because we don't have a repro case
        to work with, so this is a speculative fix based on crash dump
        diagnosis. See bug for details.

        * src/WebFrameImpl.cpp:
        (WebKit::WebFrameImpl::shouldScopeMatches):

Canonical link: https://commits.webkit.org/54678@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@63841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
webkit-commit-queue committed Jul 21, 2010
1 parent ea909c7 commit 168ac7fa506e87b3e3ba65ce8cebf2de52b4cdf9
Showing with 16 additions and 2 deletions.
  1. +14 −0 WebKit/chromium/ChangeLog
  2. +2 −2 WebKit/chromium/src/WebFrameImpl.cpp
@@ -1,3 +1,17 @@
2010-07-21 Finnur Thorarinsson <finnur.webkit@gmail.com>

Reviewed by Dimitri Glazkov.

Avoid crashing during find-in-page when |view| is NULL.
https://bugs.webkit.org/show_bug.cgi?id=42760

There are no layout tests because we don't have a repro case
to work with, so this is a speculative fix based on crash dump
diagnosis. See bug for details.

* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::shouldScopeMatches):

2010-07-21 Hans Wennborg <hans@chromium.org>

Reviewed by Steve Block.
@@ -2101,9 +2101,9 @@ int WebFrameImpl::ordinalOfFirstMatchForFrame(WebFrameImpl* frame) const

bool WebFrameImpl::shouldScopeMatches(const String& searchText)
{
// Don't scope if we can't find a frame or if the frame is not visible.
// Don't scope if we can't find a frame or a view or if the frame is not visible.
// The user may have closed the tab/application, so abort.
if (!frame() || !hasVisibleContent())
if (!frame() || !frame()->view() || !hasVisibleContent())
return false;

ASSERT(frame()->document() && frame()->view());

0 comments on commit 168ac7f

Please sign in to comment.