Changeset 83474 in webkit


Ignore:
Timestamp:
Apr 11, 2011 12:14:57 PM (13 years ago)
Author:
andersca@apple.com
Message:

2011-04-11 Anders Carlsson <andersca@apple.com>

Reviewed by Sam Weinig.

Crash in WebPageProxy::countStringMatches
https://bugs.webkit.org/show_bug.cgi?id=58255
<rdar://problem/9243837>

  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::countStringMatches): Return early if the page is not valid.
Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r83472 r83474  
     12011-04-11  Anders Carlsson  <andersca@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        Crash in WebPageProxy::countStringMatches
     6        https://bugs.webkit.org/show_bug.cgi?id=58255
     7        <rdar://problem/9243837>
     8
     9        * UIProcess/WebPageProxy.cpp:
     10        (WebKit::WebPageProxy::countStringMatches):
     11        Return early if the page is not valid.
     12
    1132011-04-11  Sam Weinig  <sam@webkit.org>
    214
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp

    r83460 r83474  
    11511151void WebPageProxy::countStringMatches(const String& string, FindOptions options, unsigned maxMatchCount)
    11521152{
    1153     if (m_mainFrameHasCustomRepresentation)
     1153    if (m_mainFrameHasCustomRepresentation) {
    11541154        m_pageClient->countStringMatchesInCustomRepresentation(string, options, maxMatchCount);
    1155     else
    1156         process()->send(Messages::WebPage::CountStringMatches(string, options, maxMatchCount), m_pageID);
     1155        return;
     1156    }
     1157
     1158    if (!isValid())
     1159        return;
     1160
     1161    process()->send(Messages::WebPage::CountStringMatches(string, options, maxMatchCount), m_pageID);
    11571162}
    11581163
Note: See TracChangeset for help on using the changeset viewer.