Ignore:
Timestamp:
Jul 7, 2010, 9:53:49 AM (15 years ago)
Author:
Darin Adler
Message:

2010-07-07 Darin Adler <Darin Adler>

Reviewed by Adam Barth.

More OwnPtr work
https://bugs.webkit.org/show_bug.cgi?id=41727

  • API/JSCallbackObject.h: (JSC::JSCallbackObjectData::setPrivateProperty): Use adoptPtr.
  • API/JSCallbackObjectFunctions.h: (JSC::JSCallbackObject::JSCallbackObject): Ditto.
  • bytecode/CodeBlock.cpp: (JSC::CodeBlock::CodeBlock): Ditto.
  • bytecode/CodeBlock.h: (JSC::CodeBlock::createRareDataIfNecessary): Ditto.
  • parser/Nodes.cpp: (JSC::ScopeNode::ScopeNode): Ditto.
  • parser/ParserArena.cpp: (JSC::ParserArena::ParserArena): Ditto.
  • runtime/Arguments.h: (JSC::Arguments::Arguments): Ditto.
  • runtime/Executable.cpp: (JSC::EvalExecutable::compile): Ditto. (JSC::ProgramExecutable::compile): Ditto. (JSC::FunctionExecutable::compileForCall): Ditto. (JSC::FunctionExecutable::compileForConstruct): Ditto. (JSC::FunctionExecutable::reparseExceptionInfo): Ditto. (JSC::EvalExecutable::reparseExceptionInfo): Ditto.
  • runtime/JSArray.cpp: (JSC::JSArray::sort): Ditto.
  • runtime/RegExpConstructor.cpp: (JSC::RegExpConstructor::RegExpConstructor): Ditto.
  • runtime/RegExpObject.cpp: (JSC::RegExpObject::RegExpObject): Ditto.
  • runtime/SmallStrings.cpp: (JSC::SmallStrings::createSingleCharacterString): Ditto. (JSC::SmallStrings::singleCharacterStringRep): Ditto.
  • wtf/unicode/icu/CollatorICU.cpp: (WTF::Collator::userDefault): Use adoptPtr.
  • yarr/RegexInterpreter.cpp: (JSC::Yarr::ByteCompiler::ByteCompiler): Ditto. (JSC::Yarr::ByteCompiler::compile): Ditto. (JSC::Yarr::ByteCompiler::regexBegin): Ditto. (JSC::Yarr::byteCompileRegex): Ditto.
  • yarr/RegexInterpreter.h: (JSC::Yarr::BytecodePattern::BytecodePattern): Ditto.

2010-07-06 Darin Adler <Darin Adler>

Reviewed by Adam Barth.

More OwnPtr work, including making clear set the pointer to 0 before deletion
https://bugs.webkit.org/show_bug.cgi?id=41727

  • WebCore.exp.in: Updated.
  • css/CSSSelector.h: (WebCore::CSSSelector::RareData::RareData): Use adoptPtr. (WebCore::CSSSelector::createRareData): Ditto.
  • dom/SpaceSplitString.h: (WebCore::SpaceSplitString::SpaceSplitString): Ditto. (WebCore::SpaceSplitString::set): Ditto.
  • history/CachedFrame.cpp: (WebCore::CachedFrame::CachedFrame): Ditto. (WebCore::CachedFrame::setCachedFramePlatformData): Ditto.
  • history/CachedFrame.h: Use PassOwnPtr.
  • loader/appcache/ApplicationCacheGroup.cpp: (WebCore::CallCacheListenerTask::create): Use adoptPtr.
  • loader/appcache/ApplicationCacheStorage.cpp: (WebCore::ApplicationCacheStorage::storeCopyOfCache): Ditto.
  • platform/PurgeableBuffer.h: (WebCore::PurgeableBuffer::create): Ditto.
  • platform/graphics/GlyphMetricsMap.h: (WebCore::::locatePageSlowCase): Ditto.
  • platform/graphics/GraphicsLayer.h: (WebCore::AnimationValue::AnimationValue): Ditto. (WebCore::TransformAnimationValue::TransformAnimationValue): Ditto.
  • platform/graphics/MediaPlayer.h: (WebCore::MediaPlayer::create): Ditto.
  • platform/graphics/SimpleFontData.h: (WebCore::SimpleFontData::boundsForGlyph): Ditto.
  • platform/mac/PurgeableBufferMac.cpp: (WebCore::PurgeableBuffer::create): Ditto.
  • rendering/InlineFlowBox.h: (WebCore::InlineFlowBox::setHorizontalOverflowPositions): Ditto. (WebCore::InlineFlowBox::setVerticalOverflowPositions): Ditto.
  • rendering/RootInlineBox.h: (WebCore::RootInlineBox::floats): Ditto.
  • rendering/style/RenderStyle.h: (WebCore::InheritedFlags::inheritAnimations): Ditto. (WebCore::InheritedFlags::inheritTransitions): Ditto.
  • rendering/style/SVGRenderStyleDefs.h: Use PassOwnPtr.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/yarr/RegexInterpreter.cpp

    r62386 r62677  
    12361236        : m_pattern(pattern)
    12371237    {
    1238         m_bodyDisjunction = 0;
    12391238        m_currentAlternativeIndex = 0;
    12401239    }
    12411240
    1242     BytecodePattern* compile()
     1241    PassOwnPtr<BytecodePattern> compile()
    12431242    {
    12441243        regexBegin(m_pattern.m_numSubpatterns, m_pattern.m_body->m_callFrameSize);
     
    12461245        regexEnd();
    12471246
    1248         return new BytecodePattern(m_bodyDisjunction, m_allParenthesesInfo, m_pattern);
     1247        return adoptPtr(new BytecodePattern(m_bodyDisjunction.release(), m_allParenthesesInfo, m_pattern));
    12491248    }
    12501249
     
    14491448    void regexBegin(unsigned numSubpatterns, unsigned callFrameSize)
    14501449    {
    1451         m_bodyDisjunction = new ByteDisjunction(numSubpatterns, callFrameSize);
     1450        m_bodyDisjunction = adoptPtr(new ByteDisjunction(numSubpatterns, callFrameSize));
    14521451        m_bodyDisjunction->terms.append(ByteTerm::BodyAlternativeBegin());
    14531452        m_bodyDisjunction->terms[0].frameLocation = 0;
     
    15691568private:
    15701569    RegexPattern& m_pattern;
    1571     ByteDisjunction* m_bodyDisjunction;
     1570    OwnPtr<ByteDisjunction> m_bodyDisjunction;
    15721571    unsigned m_currentAlternativeIndex;
    15731572    Vector<ParenthesesStackEntry> m_parenthesesStack;
     
    15761575
    15771576
    1578 BytecodePattern* byteCompileRegex(const UString& patternString, unsigned& numSubpatterns, const char*& error, bool ignoreCase, bool multiline)
     1577PassOwnPtr<BytecodePattern> byteCompileRegex(const UString& patternString, unsigned& numSubpatterns, const char*& error, bool ignoreCase, bool multiline)
    15791578{
    15801579    RegexPattern pattern(ignoreCase, multiline);
    15811580
    15821581    if ((error = compileRegex(patternString, pattern)))
    1583         return 0;
     1582        return PassOwnPtr<BytecodePattern>();
    15841583
    15851584    numSubpatterns = pattern.m_numSubpatterns;
Note: See TracChangeset for help on using the changeset viewer.