From 32761a6cee1d0dee366b885b7b9c777e67885688 Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Sun, 10 Apr 2016 09:28:39 +0000 Subject: webkitgtk-2.4.11 --- Source/JavaScriptCore/yarr/RegularExpression.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'Source/JavaScriptCore/yarr/RegularExpression.cpp') 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 { public: - static Ref create(const String& pattern, TextCaseSensitivity caseSensitivity, MultilineMode multilineMode) + static PassRefPtr 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 m_regExpByteCode; + OwnPtr m_regExpByteCode; private: Private(const String& pattern, TextCaseSensitivity caseSensitivity, MultilineMode multilineMode) @@ -55,7 +54,7 @@ private: { } - std::unique_ptr compile(const String& patternString, TextCaseSensitivity caseSensitivity, MultilineMode multilineMode) + PassOwnPtr 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 -- cgit v1.2.1