diff options
Diffstat (limited to 'Source/JavaScriptCore/yarr/RegularExpression.cpp')
-rw-r--r-- | Source/JavaScriptCore/yarr/RegularExpression.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/Source/JavaScriptCore/yarr/RegularExpression.cpp b/Source/JavaScriptCore/yarr/RegularExpression.cpp index 0c7089654..b58ad393c 100644 --- a/Source/JavaScriptCore/yarr/RegularExpression.cpp +++ b/Source/JavaScriptCore/yarr/RegularExpression.cpp @@ -1,4 +1,3 @@ - /* * Copyright (C) 2004, 2008, 2009 Apple Inc. All rights reserved. * Copyright (C) 2008 Collabora Ltd. @@ -13,10 +12,10 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -37,15 +36,15 @@ namespace JSC { namespace Yarr { class RegularExpression::Private : public RefCounted<RegularExpression::Private> { public: - static Ref<Private> create(const String& pattern, TextCaseSensitivity caseSensitivity, MultilineMode multilineMode) + static PassRefPtr<Private> create(const String& pattern, TextCaseSensitivity caseSensitivity, MultilineMode multilineMode) { - return adoptRef(*new Private(pattern, caseSensitivity, multilineMode)); + return adoptRef(new Private(pattern, caseSensitivity, multilineMode)); } int lastMatchLength; unsigned m_numSubpatterns; - std::unique_ptr<JSC::Yarr::BytecodePattern> m_regExpByteCode; + OwnPtr<JSC::Yarr::BytecodePattern> m_regExpByteCode; private: Private(const String& pattern, TextCaseSensitivity caseSensitivity, MultilineMode multilineMode) @@ -55,7 +54,7 @@ private: { } - std::unique_ptr<JSC::Yarr::BytecodePattern> compile(const String& patternString, TextCaseSensitivity caseSensitivity, MultilineMode multilineMode) + PassOwnPtr<JSC::Yarr::BytecodePattern> compile(const String& patternString, TextCaseSensitivity caseSensitivity, MultilineMode multilineMode) { JSC::Yarr::YarrPattern pattern(patternString, (caseSensitivity == TextCaseInsensitive), (multilineMode == MultilineEnabled), &m_constructionError); if (m_constructionError) { @@ -179,7 +178,7 @@ void replace(String& string, const RegularExpression& target, const String& repl bool RegularExpression::isValid() const { - return d->m_regExpByteCode.get(); + return d->m_regExpByteCode; } } } // namespace JSC::Yarr |