Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(400)

Unified Diff: Source/web/WebLocalFrameImpl.cpp

Issue 229043004: Fixed crash in WebFrameImpl::resetMatchCount function. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added delay Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/web/WebLocalFrameImpl.cpp
diff --git a/Source/web/WebLocalFrameImpl.cpp b/Source/web/WebLocalFrameImpl.cpp
index 0c9744fe66ec5ae744fa64b5993b62a5dcfe32f1..261013ec19761cdafde33bda14476a5821990078 100644
--- a/Source/web/WebLocalFrameImpl.cpp
+++ b/Source/web/WebLocalFrameImpl.cpp
@@ -1438,14 +1438,12 @@ void WebLocalFrameImpl::increaseMatchCount(int count, int identifier)
{
// This function should only be called on the mainframe.
ASSERT(!parent());
- ASSERT(m_textFinder);
- m_textFinder->increaseMatchCount(identifier, count);
+ ensureTextFinder().increaseMatchCount(identifier, count);
}
void WebLocalFrameImpl::resetMatchCount()
{
- ASSERT(m_textFinder);
- m_textFinder->resetMatchCount();
+ ensureTextFinder().resetMatchCount();
}
void WebLocalFrameImpl::sendOrientationChangeEvent()
@@ -1472,8 +1470,7 @@ int WebLocalFrameImpl::findMatchMarkersVersion() const
int WebLocalFrameImpl::selectNearestFindMatch(const WebFloatPoint& point, WebRect* selectionRect)
{
ASSERT(!parent());
- ASSERT(m_textFinder);
- return m_textFinder->selectNearestFindMatch(point, selectionRect);
+ return ensureTextFinder().selectNearestFindMatch(point, selectionRect);
}
WebFloatRect WebLocalFrameImpl::activeFindMatchRect()
@@ -1488,8 +1485,7 @@ WebFloatRect WebLocalFrameImpl::activeFindMatchRect()
void WebLocalFrameImpl::findMatchRects(WebVector<WebFloatRect>& outputRects)
{
ASSERT(!parent());
- ASSERT(m_textFinder);
- m_textFinder->findMatchRects(outputRects);
+ ensureTextFinder().findMatchRects(outputRects);
}
void WebLocalFrameImpl::setTickmarks(const WebVector<WebRect>& tickmarks)
« no previous file with comments | « no previous file | Source/web/tests/WebFrameTest.cpp » ('j') | Source/web/tests/data/find_in_generated_frame.html » ('J')

Powered by Google App Engine
This is Rietveld 408576698