Changeset 85020 in webkit


Ignore:
Timestamp:
Apr 26, 2011 11:08:32 PM (13 years ago)
Author:
levin@chromium.org
Message:

2011-04-26 David Levin <levin@chromium.org>

Reviewed by Eric Seidel.

Fix some strict PassOwnPtr issues in WebCore.
https://bugs.webkit.org/show_bug.cgi?id=59563

  • css/SVGCSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applySVGProperty):
  • html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::create): (WebCore::WebGLRenderingContext::~WebGLRenderingContext):
  • platform/text/TextCodecLatin1.cpp: (WebCore::newStreamingTextDecoderWindowsLatin1):
  • platform/text/TextCodecUTF16.cpp: (WebCore::newStreamingTextDecoderUTF16LE): (WebCore::newStreamingTextDecoderUTF16BE):
  • platform/text/TextCodecUserDefined.cpp: (WebCore::newStreamingTextDecoderUserDefined):
  • platform/text/mac/TextCodecMac.cpp: (WebCore::newTextCodecMac):
  • workers/Worker.cpp: (WebCore::Worker::notifyFinished):
Location:
trunk/Source/WebCore
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r85017 r85020  
     12011-04-26  David Levin  <levin@chromium.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Fix some strict PassOwnPtr issues in WebCore.
     6        https://bugs.webkit.org/show_bug.cgi?id=59563
     7
     8        * css/SVGCSSStyleSelector.cpp:
     9        (WebCore::CSSStyleSelector::applySVGProperty):
     10        * html/canvas/WebGLRenderingContext.cpp:
     11        (WebCore::WebGLRenderingContext::create):
     12        (WebCore::WebGLRenderingContext::~WebGLRenderingContext):
     13        * platform/text/TextCodecLatin1.cpp:
     14        (WebCore::newStreamingTextDecoderWindowsLatin1):
     15        * platform/text/TextCodecUTF16.cpp:
     16        (WebCore::newStreamingTextDecoderUTF16LE):
     17        (WebCore::newStreamingTextDecoderUTF16BE):
     18        * platform/text/TextCodecUserDefined.cpp:
     19        (WebCore::newStreamingTextDecoderUserDefined):
     20        * platform/text/mac/TextCodecMac.cpp:
     21        (WebCore::newTextCodecMac):
     22        * workers/Worker.cpp:
     23        (WebCore::Worker::notifyFinished):
     24
    1252011-04-26  Justin Novosad  <junov@chromium.org>
    226
  • trunk/Source/WebCore/css/SVGCSSStyleSelector.cpp

    r79985 r85020  
    563563        case CSSPropertyWebkitSvgShadow: {
    564564            if (isInherit)
    565                 return svgstyle->setShadow(m_parentStyle->svgStyle()->shadow() ? new ShadowData(*m_parentStyle->svgStyle()->shadow()) : 0);
     565                return svgstyle->setShadow(adoptPtr(m_parentStyle->svgStyle()->shadow() ? new ShadowData(*m_parentStyle->svgStyle()->shadow()) : 0));
    566566            if (isInitial || primitiveValue) // initial | none
    567                 return svgstyle->setShadow(0);
     567                return svgstyle->setShadow(PassOwnPtr<ShadowData>());
    568568
    569569            if (!value->isValueList())
     
    589589            ASSERT(!item->style);
    590590               
    591             ShadowData* shadowData = new ShadowData(x, y, blur, 0, Normal, false, color.isValid() ? color : Color::transparent);
    592             svgstyle->setShadow(shadowData);
     591            OwnPtr<ShadowData> shadowData = adoptPtr(new ShadowData(x, y, blur, 0, Normal, false, color.isValid() ? color : Color::transparent));
     592            svgstyle->setShadow(shadowData.release());
    593593            return;
    594594        }
  • trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp

    r84764 r85020  
    372372    if (!context) {
    373373        canvas->dispatchEvent(WebGLContextEvent::create(eventNames().webglcontextcreationerrorEvent, false, true, "Could not create a WebGL context."));
    374         return 0;
    375     }
    376 
    377     return new WebGLRenderingContext(canvas, context, attributes);
     374        return PassOwnPtr<WebGLRenderingContext>();
     375    }
     376
     377    return adoptPtr(new WebGLRenderingContext(canvas, context, attributes));
    378378}
    379379
     
    474474{
    475475    detachAndRemoveAllObjects();
    476     m_context->setContextLostCallback(0);
     476    m_context->setContextLostCallback(PassOwnPtr<GraphicsContext3D::ContextLostCallback>());
    477477}
    478478
  • trunk/Source/WebCore/platform/text/TextCodecLatin1.cpp

    r78580 r85020  
    105105static PassOwnPtr<TextCodec> newStreamingTextDecoderWindowsLatin1(const TextEncoding&, const void*)
    106106{
    107     return new TextCodecLatin1;
     107    return adoptPtr(new TextCodecLatin1);
    108108}
    109109
  • trunk/Source/WebCore/platform/text/TextCodecUTF16.cpp

    r79486 r85020  
    5353static PassOwnPtr<TextCodec> newStreamingTextDecoderUTF16LE(const TextEncoding&, const void*)
    5454{
    55     return new TextCodecUTF16(true);
     55    return adoptPtr(new TextCodecUTF16(true));
    5656}
    5757
    5858static PassOwnPtr<TextCodec> newStreamingTextDecoderUTF16BE(const TextEncoding&, const void*)
    5959{
    60     return new TextCodecUTF16(false);
     60    return adoptPtr(new TextCodecUTF16(false));
    6161}
    6262
  • trunk/Source/WebCore/platform/text/TextCodecUserDefined.cpp

    r65077 r85020  
    4242static PassOwnPtr<TextCodec> newStreamingTextDecoderUserDefined(const TextEncoding&, const void*)
    4343{
    44     return new TextCodecUserDefined;
     44    return adoptPtr(new TextCodecUserDefined);
    4545}
    4646
  • trunk/Source/WebCore/platform/text/mac/TextCodecMac.cpp

    r77062 r85020  
    6868static PassOwnPtr<TextCodec> newTextCodecMac(const TextEncoding&, const void* additionalData)
    6969{
    70     return new TextCodecMac(*static_cast<const TECTextEncodingID*>(additionalData));
     70    return adoptPtr(new TextCodecMac(*static_cast<const TECTextEncodingID*>(additionalData)));
    7171}
    7272
  • trunk/Source/WebCore/workers/Worker.cpp

    r84773 r85020  
    137137        InspectorInstrumentation::scriptImported(scriptExecutionContext(), m_scriptLoader->identifier(), m_scriptLoader->script());
    138138    }
    139     m_scriptLoader = 0;
     139    m_scriptLoader = nullptr;
    140140
    141141    unsetPendingActivity(this);
Note: See TracChangeset for help on using the changeset viewer.