summaryrefslogtreecommitdiffstats
path: root/WebCore/editing
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/editing')
-rw-r--r--WebCore/editing/TextIterator.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/WebCore/editing/TextIterator.cpp b/WebCore/editing/TextIterator.cpp
index 2ea16fb..182742e 100644
--- a/WebCore/editing/TextIterator.cpp
+++ b/WebCore/editing/TextIterator.cpp
@@ -1869,6 +1869,11 @@ inline SearchBuffer::SearchBuffer(const String& target, bool isCaseSensitive)
inline SearchBuffer::~SearchBuffer()
{
+ // Leave the static object pointing to a valid string.
+ UErrorCode status = U_ZERO_ERROR;
+ usearch_setPattern(WebCore::searcher(), &newlineCharacter, 1, &status);
+ ASSERT(status == U_ZERO_ERROR);
+
unlockSearcher();
}