Changeset 89223 in webkit


Ignore:
Timestamp:
Jun 19, 2011 2:07:33 PM (13 years ago)
Author:
Darin Adler
Message:

2011-06-19 Darin Adler <Darin Adler>

Reviewed by Sam Weinig.

RefPtr misused as argument type in a few classes
https://bugs.webkit.org/show_bug.cgi?id=62955

  • dom/DataTransferItem.cpp: (WebCore::DataTransferItem::DataTransferItem):
  • dom/DataTransferItem.h:
  • dom/DataTransferItems.cpp: (WebCore::DataTransferItems::DataTransferItems):
  • dom/DataTransferItems.h:
  • editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::rebalanceWhitespaceOnTextSubstring):
  • editing/CompositeEditCommand.h:
  • inspector/InspectorConsoleInstrumentation.h:
  • inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::addProfileImpl):
  • inspector/InspectorInstrumentation.h:
  • inspector/InspectorProfilerAgent.h:
  • inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyleSheet::inspectorStyleForId): (WebCore::InspectorStyleSheet::rememberInspectorStyle):
  • inspector/InspectorStyleSheet.h:
  • page/WebKitAnimationList.cpp: (WebCore::WebKitAnimationList::append): (WebCore::WebKitAnimationList::insertAnimation):
  • page/WebKitAnimationList.h:
  • svg/graphics/filters/SVGFEImage.cpp: (WebCore::FEImage::FEImage): (WebCore::FEImage::create):
  • svg/graphics/filters/SVGFEImage.h:
  • svg/graphics/filters/SVGFilterBuilder.cpp: (WebCore::SVGFilterBuilder::SVGFilterBuilder): (WebCore::SVGFilterBuilder::add): (WebCore::SVGFilterBuilder::appendEffectToEffectReferences):
  • svg/graphics/filters/SVGFilterBuilder.h:
  • websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::didConnectCallback): (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageCallback): (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshakeCallback): (WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback):
  • websockets/ThreadableWebSocketChannelClientWrapper.h:
  • websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::WorkerThreadableWebSocketChannel::Peer::Peer): (WebCore::WorkerThreadableWebSocketChannel::Bridge::setWebSocketChannel): (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadCreateWebSocketChannel):
  • websockets/WorkerThreadableWebSocketChannel.h: Use PassRefPtr or raw pointer as appropriate for RefPtr arguments.
Location:
trunk/Source/WebCore
Files:
25 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r89221 r89223  
     12011-06-19  Darin Adler  <darin@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        RefPtr misused as argument type in a few classes
     6        https://bugs.webkit.org/show_bug.cgi?id=62955
     7
     8        * dom/DataTransferItem.cpp:
     9        (WebCore::DataTransferItem::DataTransferItem):
     10        * dom/DataTransferItem.h:
     11        * dom/DataTransferItems.cpp:
     12        (WebCore::DataTransferItems::DataTransferItems):
     13        * dom/DataTransferItems.h:
     14        * editing/CompositeEditCommand.cpp:
     15        (WebCore::CompositeEditCommand::rebalanceWhitespaceOnTextSubstring):
     16        * editing/CompositeEditCommand.h:
     17        * inspector/InspectorConsoleInstrumentation.h:
     18        * inspector/InspectorInstrumentation.cpp:
     19        (WebCore::InspectorInstrumentation::addProfileImpl):
     20        * inspector/InspectorInstrumentation.h:
     21        * inspector/InspectorProfilerAgent.h:
     22        * inspector/InspectorStyleSheet.cpp:
     23        (WebCore::InspectorStyleSheet::inspectorStyleForId):
     24        (WebCore::InspectorStyleSheet::rememberInspectorStyle):
     25        * inspector/InspectorStyleSheet.h:
     26        * page/WebKitAnimationList.cpp:
     27        (WebCore::WebKitAnimationList::append):
     28        (WebCore::WebKitAnimationList::insertAnimation):
     29        * page/WebKitAnimationList.h:
     30        * svg/graphics/filters/SVGFEImage.cpp:
     31        (WebCore::FEImage::FEImage):
     32        (WebCore::FEImage::create):
     33        * svg/graphics/filters/SVGFEImage.h:
     34        * svg/graphics/filters/SVGFilterBuilder.cpp:
     35        (WebCore::SVGFilterBuilder::SVGFilterBuilder):
     36        (WebCore::SVGFilterBuilder::add):
     37        (WebCore::SVGFilterBuilder::appendEffectToEffectReferences):
     38        * svg/graphics/filters/SVGFilterBuilder.h:
     39        * websockets/ThreadableWebSocketChannelClientWrapper.cpp:
     40        (WebCore::ThreadableWebSocketChannelClientWrapper::didConnectCallback):
     41        (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageCallback):
     42        (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshakeCallback):
     43        (WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback):
     44        * websockets/ThreadableWebSocketChannelClientWrapper.h:
     45        * websockets/WorkerThreadableWebSocketChannel.cpp:
     46        (WebCore::WorkerThreadableWebSocketChannel::Peer::Peer):
     47        (WebCore::WorkerThreadableWebSocketChannel::Bridge::setWebSocketChannel):
     48        (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadCreateWebSocketChannel):
     49        * websockets/WorkerThreadableWebSocketChannel.h:
     50        Use PassRefPtr or raw pointer as appropriate for RefPtr arguments.
     51
    1522011-06-19  Una Sabovic  <una.sabovic@palm.com>
    253
  • trunk/Source/WebCore/dom/DataTransferItem.cpp

    r84857 r89223  
    4141const char DataTransferItem::kindFile[] = "file";
    4242
    43 DataTransferItem::DataTransferItem(RefPtr<Clipboard> owner, const String& kind, const String& type)
     43DataTransferItem::DataTransferItem(PassRefPtr<Clipboard> owner, const String& kind, const String& type)
    4444    : m_owner(owner)
    4545    , m_kind(kind)
  • trunk/Source/WebCore/dom/DataTransferItem.h

    r88099 r89223  
    6161
    6262protected:
    63     DataTransferItem(RefPtr<Clipboard> owner, const String& kind, const String& type);
     63    DataTransferItem(PassRefPtr<Clipboard> owner, const String& kind, const String& type);
    6464    Clipboard* owner();
    6565
  • trunk/Source/WebCore/dom/DataTransferItems.cpp

    r84857 r89223  
    4040namespace WebCore {
    4141
    42 DataTransferItems::DataTransferItems(RefPtr<Clipboard> clipboard, ScriptExecutionContext* context)
     42DataTransferItems::DataTransferItems(PassRefPtr<Clipboard> clipboard, ScriptExecutionContext* context)
    4343    : m_owner(clipboard)
    4444    , m_context(context)
  • trunk/Source/WebCore/dom/DataTransferItems.h

    r88099 r89223  
    5555
    5656protected:
    57     DataTransferItems(RefPtr<Clipboard>, ScriptExecutionContext*);
     57    DataTransferItems(PassRefPtr<Clipboard>, ScriptExecutionContext*);
    5858
    5959protected:
  • trunk/Source/WebCore/editing/CompositeEditCommand.cpp

    r88476 r89223  
    460460}
    461461
    462 void CompositeEditCommand::rebalanceWhitespaceOnTextSubstring(RefPtr<Text> textNode, int startOffset, int endOffset)
    463 {
     462void CompositeEditCommand::rebalanceWhitespaceOnTextSubstring(PassRefPtr<Text> prpTextNode, int startOffset, int endOffset)
     463{
     464    RefPtr<Text> textNode = prpTextNode;
     465
    464466    String text = textNode->data();
    465467    ASSERT(!text.isEmpty());
     
    489491   
    490492    if (string != rebalancedString)
    491         replaceTextInNodePreservingMarkers(textNode, upstream, length, rebalancedString);
     493        replaceTextInNodePreservingMarkers(textNode.release(), upstream, length, rebalancedString);
    492494}
    493495
  • trunk/Source/WebCore/editing/CompositeEditCommand.h

    r86854 r89223  
    7070    void rebalanceWhitespace();
    7171    void rebalanceWhitespaceAt(const Position&);
    72     void rebalanceWhitespaceOnTextSubstring(RefPtr<Text>, int startOffset, int endOffset);
     72    void rebalanceWhitespaceOnTextSubstring(PassRefPtr<Text>, int startOffset, int endOffset);
    7373    void prepareWhitespaceAtPositionForSplit(Position&);
    7474    bool canRebalance(const Position&) const;
  • trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp

    r87317 r89223  
    305305}
    306306
    307 void InspectorCSSAgent::setPropertyText(ErrorString* errorString, const RefPtr<InspectorObject>& fullStyleId, int propertyIndex, const String& text, bool overwrite, RefPtr<InspectorObject>* result)
     307void InspectorCSSAgent::setPropertyText(ErrorString* errorString, InspectorObject* fullStyleId, int propertyIndex, const String& text, bool overwrite, RefPtr<InspectorObject>* result)
    308308{
    309309    InspectorCSSId compoundId(fullStyleId);
     
    319319}
    320320
    321 void InspectorCSSAgent::toggleProperty(ErrorString* errorString, const RefPtr<InspectorObject>& fullStyleId, int propertyIndex, bool disable, RefPtr<InspectorObject>* result)
     321void InspectorCSSAgent::toggleProperty(ErrorString* errorString, InspectorObject* fullStyleId, int propertyIndex, bool disable, RefPtr<InspectorObject>* result)
    322322{
    323323    InspectorCSSId compoundId(fullStyleId);
     
    333333}
    334334
    335 void InspectorCSSAgent::setRuleSelector(ErrorString* errorString, const RefPtr<InspectorObject>& fullRuleId, const String& selector, RefPtr<InspectorObject>* result)
     335void InspectorCSSAgent::setRuleSelector(ErrorString* errorString, InspectorObject* fullRuleId, const String& selector, RefPtr<InspectorObject>* result)
    336336{
    337337    InspectorCSSId compoundId(fullRuleId);
  • trunk/Source/WebCore/inspector/InspectorCSSAgent.h

    r86754 r89223  
    6969    void getStyleSheetText(ErrorString*, const String& styleSheetId, String* result);
    7070    void setStyleSheetText(ErrorString*, const String& styleSheetId, const String& text);
    71     void setPropertyText(ErrorString*, const RefPtr<InspectorObject>& styleId, int propertyIndex, const String& text, bool overwrite, RefPtr<InspectorObject>* result);
    72     void toggleProperty(ErrorString*, const RefPtr<InspectorObject>& styleId, int propertyIndex, bool disable, RefPtr<InspectorObject>* result);
    73     void setRuleSelector(ErrorString*, const RefPtr<InspectorObject>& ruleId, const String& selector, RefPtr<InspectorObject>* result);
     71    void setPropertyText(ErrorString*, InspectorObject* styleId, int propertyIndex, const String& text, bool overwrite, RefPtr<InspectorObject>* result);
     72    void toggleProperty(ErrorString*, InspectorObject* styleId, int propertyIndex, bool disable, RefPtr<InspectorObject>* result);
     73    void setRuleSelector(ErrorString*, InspectorObject* ruleId, const String& selector, RefPtr<InspectorObject>* result);
    7474    void addRule(ErrorString*, const int contextNodeId, const String& selector, RefPtr<InspectorObject>* result);
    7575    void getSupportedCSSProperties(ErrorString*, RefPtr<InspectorArray>* result);
  • trunk/Source/WebCore/inspector/InspectorConsoleInstrumentation.h

    r86752 r89223  
    9797}
    9898
    99 inline void InspectorInstrumentation::addProfile(Page* page, RefPtr<ScriptProfile> profile, PassRefPtr<ScriptCallStack> callStack)
     99inline void InspectorInstrumentation::addProfile(Page* page, PassRefPtr<ScriptProfile> profile, PassRefPtr<ScriptCallStack> callStack)
    100100{
    101101#if ENABLE(INSPECTOR)
  • trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp

    r89163 r89223  
    699699}
    700700
    701 void InspectorInstrumentation::addProfileImpl(InstrumentingAgents* instrumentingAgents, RefPtr<ScriptProfile> profile, PassRefPtr<ScriptCallStack> callStack)
     701void InspectorInstrumentation::addProfileImpl(InstrumentingAgents* instrumentingAgents, PassRefPtr<ScriptProfile> profile, PassRefPtr<ScriptCallStack> callStack)
    702702{
    703703    if (InspectorProfilerAgent* profilerAgent = instrumentingAgents->inspectorProfilerAgent()) {
  • trunk/Source/WebCore/inspector/InspectorInstrumentation.h

    r89163 r89223  
    151151#if ENABLE(JAVASCRIPT_DEBUGGER)
    152152    static void addStartProfilingMessageToConsole(Page*, const String& title, unsigned lineNumber, const String& sourceURL);
    153     static void addProfile(Page*, RefPtr<ScriptProfile>, PassRefPtr<ScriptCallStack>);
     153    static void addProfile(Page*, PassRefPtr<ScriptProfile>, PassRefPtr<ScriptCallStack>);
    154154    static String getCurrentUserInitiatedProfileName(Page*, bool incrementProfileNumber);
    155155    static bool profilerEnabled(Page*);
     
    279279#if ENABLE(JAVASCRIPT_DEBUGGER)
    280280    static void addStartProfilingMessageToConsoleImpl(InstrumentingAgents*, const String& title, unsigned lineNumber, const String& sourceURL);
    281     static void addProfileImpl(InstrumentingAgents*, RefPtr<ScriptProfile>, PassRefPtr<ScriptCallStack>);
     281    static void addProfileImpl(InstrumentingAgents*, PassRefPtr<ScriptProfile>, PassRefPtr<ScriptCallStack>);
    282282    static String getCurrentUserInitiatedProfileNameImpl(InstrumentingAgents*, bool incrementProfileNumber);
    283283    static bool profilerEnabledImpl(InstrumentingAgents*);
  • trunk/Source/WebCore/inspector/InspectorProfilerAgent.h

    r82393 r89223  
    6060    virtual ~InspectorProfilerAgent();
    6161
    62     void addProfile(PassRefPtr<ScriptProfile> prpProfile, unsigned lineNumber, const String& sourceURL);
     62    void addProfile(PassRefPtr<ScriptProfile>, unsigned lineNumber, const String& sourceURL);
    6363    void addProfileFinishedMessageToConsole(PassRefPtr<ScriptProfile>, unsigned lineNumber, const String& sourceURL);
    6464    void addStartProfilingMessageToConsole(const String& title, unsigned lineNumber, const String& sourceURL);
  • trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp

    r89163 r89223  
    876876        return 0;
    877877
    878     InspectorStyleMap::iterator it = m_inspectorStyles.find(style);
    879     if (it == m_inspectorStyles.end()) {
    880         RefPtr<InspectorStyle> inspectorStyle = InspectorStyle::create(id, style, this);
     878    if (RefPtr<InspectorStyle> inspectorStyle = m_inspectorStyles.get(style))
    881879        return inspectorStyle.release();
    882     }
    883     return it->second;
    884 }
    885 
    886 void InspectorStyleSheet::rememberInspectorStyle(RefPtr<InspectorStyle> inspectorStyle)
    887 {
    888     m_inspectorStyles.set(inspectorStyle->cssStyle(), inspectorStyle);
     880
     881    return InspectorStyle::create(id, style, this);
     882}
     883
     884void InspectorStyleSheet::rememberInspectorStyle(PassRefPtr<InspectorStyle> prpInspectorStyle)
     885{
     886    RefPtr<InspectorStyle> inspectorStyle = prpInspectorStyle;
     887    CSSStyleDeclaration* cssStyle = inspectorStyle->cssStyle();
     888    m_inspectorStyles.set(cssStyle, inspectorStyle.release());
    889889}
    890890
  • trunk/Source/WebCore/inspector/InspectorStyleSheet.h

    r88950 r89223  
    5656    InspectorCSSId() { }
    5757
    58     explicit InspectorCSSId(RefPtr<InspectorObject> value)
     58    explicit InspectorCSSId(InspectorObject* value)
    5959    {
    6060        if (!value->getString("styleSheetId", &m_styleSheetId))
     
    190190    virtual bool ensureParsedDataReady();
    191191    virtual PassRefPtr<InspectorStyle> inspectorStyleForId(const InspectorCSSId&);
    192     virtual void rememberInspectorStyle(RefPtr<InspectorStyle> inspectorStyle);
     192    virtual void rememberInspectorStyle(PassRefPtr<InspectorStyle>);
    193193    virtual void forgetInspectorStyle(CSSStyleDeclaration* style);
    194194
     
    239239    virtual bool ensureParsedDataReady();
    240240    virtual PassRefPtr<InspectorStyle> inspectorStyleForId(const InspectorCSSId&);
    241     virtual void rememberInspectorStyle(RefPtr<InspectorStyle>) { }
     241    virtual void rememberInspectorStyle(PassRefPtr<InspectorStyle>) { }
    242242    virtual void forgetInspectorStyle(CSSStyleDeclaration*) { }
    243243
  • trunk/Source/WebCore/page/WebKitAnimationList.cpp

    r80846 r89223  
    2727#include "WebKitAnimationList.h"
    2828
    29 #include "Animation.h"
    30 #include "AnimationBase.h"
    31 #include "RenderStyle.h"
    3229#include "WebKitAnimation.h"
    3330
     
    6259}
    6360
    64 void WebKitAnimationList::append(RefPtr<WebKitAnimation> animation)
     61void WebKitAnimationList::append(PassRefPtr<WebKitAnimation> animation)
    6562{
    6663    m_animations.append(animation);
    6764}
    6865
    69 unsigned WebKitAnimationList::insertAnimation(RefPtr<WebKitAnimation> animation, unsigned index)
     66unsigned WebKitAnimationList::insertAnimation(PassRefPtr<WebKitAnimation> animation, unsigned index)
    7067{
    7168    if (!animation)
     
    8077
    8178} // namespace WebCore
    82 
  • trunk/Source/WebCore/page/WebKitAnimationList.h

    r80846 r89223  
    4040    static PassRefPtr<WebKitAnimationList> create()
    4141    {
    42         return adoptRef(new WebKitAnimationList());
     42        return adoptRef(new WebKitAnimationList);
    4343    }
    4444    ~WebKitAnimationList();
     
    4747    WebKitAnimation* item(unsigned index);
    4848
    49     unsigned insertAnimation(RefPtr<WebKitAnimation>, unsigned index);
     49    unsigned insertAnimation(PassRefPtr<WebKitAnimation>, unsigned index);
    5050    void deleteAnimation(unsigned index);
    51     void append(RefPtr<WebKitAnimation>);
     51    void append(PassRefPtr<WebKitAnimation>);
    5252
    5353private:
  • trunk/Source/WebCore/svg/graphics/filters/SVGFEImage.cpp

    r75377 r89223  
    3535namespace WebCore {
    3636
    37 FEImage::FEImage(Filter* filter, RefPtr<Image> image, const SVGPreserveAspectRatio& preserveAspectRatio)
     37FEImage::FEImage(Filter* filter, PassRefPtr<Image> image, const SVGPreserveAspectRatio& preserveAspectRatio)
    3838    : FilterEffect(filter)
    3939    , m_image(image)
     
    4242}
    4343
    44 PassRefPtr<FEImage> FEImage::create(Filter* filter, RefPtr<Image> image, const SVGPreserveAspectRatio& preserveAspectRatio)
     44PassRefPtr<FEImage> FEImage::create(Filter* filter, PassRefPtr<Image> image, const SVGPreserveAspectRatio& preserveAspectRatio)
    4545{
    4646    return adoptRef(new FEImage(filter, image, preserveAspectRatio));
  • trunk/Source/WebCore/svg/graphics/filters/SVGFEImage.h

    r75377 r89223  
    3434class FEImage : public FilterEffect {
    3535public:
    36     static PassRefPtr<FEImage> create(Filter*, RefPtr<Image>, const SVGPreserveAspectRatio&);
     36    static PassRefPtr<FEImage> create(Filter*, PassRefPtr<Image>, const SVGPreserveAspectRatio&);
    3737
    3838    void setAbsoluteSubregion(const FloatRect& absoluteSubregion) { m_absoluteSubregion = absoluteSubregion; }
     
    4848   
    4949private:
    50     FEImage(Filter*, RefPtr<Image>, const SVGPreserveAspectRatio&);
     50    FEImage(Filter*, PassRefPtr<Image>, const SVGPreserveAspectRatio&);
    5151
    5252    RefPtr<Image> m_image;
  • trunk/Source/WebCore/svg/graphics/filters/SVGFilterBuilder.cpp

    r76590 r89223  
    3333
    3434SVGFilterBuilder::SVGFilterBuilder(Filter* filter)
    35     : m_lastEffect(0)
    3635{
    3736    m_builtinEffects.add(SourceGraphic::effectName(), SourceGraphic::create(filter));
     
    4039}
    4140
    42 void SVGFilterBuilder::add(const AtomicString& id, RefPtr<FilterEffect> effect)
     41void SVGFilterBuilder::add(const AtomicString& id, PassRefPtr<FilterEffect> effect)
    4342{
    4443    if (id.isEmpty()) {
     
    6968}
    7069
    71 void SVGFilterBuilder::appendEffectToEffectReferences(RefPtr<FilterEffect> effectReference, RenderObject* object)
     70void SVGFilterBuilder::appendEffectToEffectReferences(PassRefPtr<FilterEffect> prpEffect, RenderObject* object)
    7271{
     72    RefPtr<FilterEffect> effect = prpEffect;
     73
    7374    // The effect must be a newly created filter effect.
    74     ASSERT(!m_effectReferences.contains(effectReference));
     75    ASSERT(!m_effectReferences.contains(effect));
    7576    ASSERT(object && !m_effectRenderer.contains(object));
    76     m_effectReferences.add(effectReference, FilterEffectSet());
     77    m_effectReferences.add(effect, FilterEffectSet());
    7778
    78     FilterEffect* effect = effectReference.get();
    7979    unsigned numberOfInputEffects = effect->inputEffects().size();
    8080
    8181    // It is not possible to add the same value to a set twice.
    8282    for (unsigned i = 0; i < numberOfInputEffects; ++i)
    83         effectReferences(effect->inputEffect(i)).add(effect);
    84     m_effectRenderer.add(object, effectReference.get());
     83        effectReferences(effect->inputEffect(i)).add(effect.get());
     84    m_effectRenderer.add(object, effect.get());
    8585}
    8686
  • trunk/Source/WebCore/svg/graphics/filters/SVGFilterBuilder.h

    r76590 r89223  
    4040    static PassRefPtr<SVGFilterBuilder> create(Filter* filter) { return adoptRef(new SVGFilterBuilder(filter)); }
    4141
    42     void add(const AtomicString& id, RefPtr<FilterEffect> effect);
     42    void add(const AtomicString& id, PassRefPtr<FilterEffect>);
    4343
    4444    FilterEffect* getEffectById(const AtomicString& id) const;
    4545    FilterEffect* lastEffect() const { return m_lastEffect.get(); }
    4646
    47     void appendEffectToEffectReferences(RefPtr<FilterEffect>, RenderObject*);
     47    void appendEffectToEffectReferences(PassRefPtr<FilterEffect>, RenderObject*);
    4848
    4949    inline FilterEffectSet& effectReferences(FilterEffect* effect)
  • trunk/Source/WebCore/websockets/ThreadableWebSocketChannelClientWrapper.cpp

    r87674 r89223  
    145145}
    146146
    147 void ThreadableWebSocketChannelClientWrapper::didConnectCallback(ScriptExecutionContext* context, RefPtr<ThreadableWebSocketChannelClientWrapper> wrapper)
     147void ThreadableWebSocketChannelClientWrapper::didConnectCallback(ScriptExecutionContext* context, ThreadableWebSocketChannelClientWrapper* wrapper)
    148148{
    149149    ASSERT_UNUSED(context, !context);
     
    152152}
    153153
    154 void ThreadableWebSocketChannelClientWrapper::didReceiveMessageCallback(ScriptExecutionContext* context, RefPtr<ThreadableWebSocketChannelClientWrapper> wrapper, String message)
     154void ThreadableWebSocketChannelClientWrapper::didReceiveMessageCallback(ScriptExecutionContext* context, ThreadableWebSocketChannelClientWrapper* wrapper, String message)
    155155{
    156156    ASSERT_UNUSED(context, !context);
     
    159159}
    160160
    161 void ThreadableWebSocketChannelClientWrapper::didStartClosingHandshakeCallback(ScriptExecutionContext* context, RefPtr<ThreadableWebSocketChannelClientWrapper> wrapper)
     161void ThreadableWebSocketChannelClientWrapper::didStartClosingHandshakeCallback(ScriptExecutionContext* context, ThreadableWebSocketChannelClientWrapper* wrapper)
    162162{
    163163    ASSERT_UNUSED(context, !context);
     
    166166}
    167167
    168 void ThreadableWebSocketChannelClientWrapper::didCloseCallback(ScriptExecutionContext* context, RefPtr<ThreadableWebSocketChannelClientWrapper> wrapper, unsigned long unhandledBufferedAmount, WebSocketChannelClient::ClosingHandshakeCompletionStatus closingHandshakeCompletion)
     168void ThreadableWebSocketChannelClientWrapper::didCloseCallback(ScriptExecutionContext* context, ThreadableWebSocketChannelClientWrapper* wrapper, unsigned long unhandledBufferedAmount, WebSocketChannelClient::ClosingHandshakeCompletionStatus closingHandshakeCompletion)
    169169{
    170170    ASSERT_UNUSED(context, !context);
  • trunk/Source/WebCore/websockets/ThreadableWebSocketChannelClientWrapper.h

    r87674 r89223  
    7474
    7575    void processPendingTasks();
    76     static void didConnectCallback(ScriptExecutionContext*, RefPtr<ThreadableWebSocketChannelClientWrapper>);
    77     static void didReceiveMessageCallback(ScriptExecutionContext*, RefPtr<ThreadableWebSocketChannelClientWrapper>, String message);
    78     static void didStartClosingHandshakeCallback(ScriptExecutionContext*, RefPtr<ThreadableWebSocketChannelClientWrapper>);
    79     static void didCloseCallback(ScriptExecutionContext*, RefPtr<ThreadableWebSocketChannelClientWrapper>, unsigned long unhandledBufferedAmount, WebSocketChannelClient::ClosingHandshakeCompletionStatus);
     76    static void didConnectCallback(ScriptExecutionContext*, ThreadableWebSocketChannelClientWrapper*);
     77    static void didReceiveMessageCallback(ScriptExecutionContext*, ThreadableWebSocketChannelClientWrapper*, String message);
     78    static void didStartClosingHandshakeCallback(ScriptExecutionContext*, ThreadableWebSocketChannelClientWrapper*);
     79    static void didCloseCallback(ScriptExecutionContext*, ThreadableWebSocketChannelClientWrapper*, unsigned long unhandledBufferedAmount, WebSocketChannelClient::ClosingHandshakeCompletionStatus);
    8080
    8181    WebSocketChannelClient* m_client;
  • trunk/Source/WebCore/websockets/WorkerThreadableWebSocketChannel.cpp

    r87674 r89223  
    115115}
    116116
    117 WorkerThreadableWebSocketChannel::Peer::Peer(RefPtr<ThreadableWebSocketChannelClientWrapper> clientWrapper, WorkerLoaderProxy& loaderProxy, ScriptExecutionContext* context, const String& taskMode, const KURL& url, const String& protocol)
     117WorkerThreadableWebSocketChannel::Peer::Peer(PassRefPtr<ThreadableWebSocketChannelClientWrapper> clientWrapper, WorkerLoaderProxy& loaderProxy, ScriptExecutionContext* context, const String& taskMode, const KURL& url, const String& protocol)
    118118    : m_workerClientWrapper(clientWrapper)
    119119    , m_loaderProxy(loaderProxy)
     
    259259}
    260260
    261 void WorkerThreadableWebSocketChannel::Bridge::setWebSocketChannel(ScriptExecutionContext* context, Bridge* thisPtr, Peer* peer, RefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper)
     261void WorkerThreadableWebSocketChannel::Bridge::setWebSocketChannel(ScriptExecutionContext* context, Bridge* thisPtr, Peer* peer, PassRefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper)
    262262{
    263263    ASSERT_UNUSED(context, context->isWorkerContext());
     
    266266}
    267267
    268 void WorkerThreadableWebSocketChannel::Bridge::mainThreadCreateWebSocketChannel(ScriptExecutionContext* context, Bridge* thisPtr, RefPtr<ThreadableWebSocketChannelClientWrapper> clientWrapper, const String& taskMode, const KURL& url, const String& protocol)
     268void WorkerThreadableWebSocketChannel::Bridge::mainThreadCreateWebSocketChannel(ScriptExecutionContext* context, Bridge* thisPtr, PassRefPtr<ThreadableWebSocketChannelClientWrapper> clientWrapper, const String& taskMode, const KURL& url, const String& protocol)
    269269{
    270270    ASSERT(isMainThread());
  • trunk/Source/WebCore/websockets/WorkerThreadableWebSocketChannel.h

    r87674 r89223  
    8383        WTF_MAKE_NONCOPYABLE(Peer); WTF_MAKE_FAST_ALLOCATED;
    8484    public:
    85         static Peer* create(RefPtr<ThreadableWebSocketChannelClientWrapper> clientWrapper, WorkerLoaderProxy& loaderProxy, ScriptExecutionContext* context, const String& taskMode, const KURL& url, const String& protocol)
     85        static Peer* create(PassRefPtr<ThreadableWebSocketChannelClientWrapper> clientWrapper, WorkerLoaderProxy& loaderProxy, ScriptExecutionContext* context, const String& taskMode, const KURL& url, const String& protocol)
    8686        {
    8787            return new Peer(clientWrapper, loaderProxy, context, taskMode, url, protocol);
     
    104104
    105105    private:
    106         Peer(RefPtr<ThreadableWebSocketChannelClientWrapper>, WorkerLoaderProxy&, ScriptExecutionContext*, const String& taskMode, const KURL&, const String& protocol);
     106        Peer(PassRefPtr<ThreadableWebSocketChannelClientWrapper>, WorkerLoaderProxy&, ScriptExecutionContext*, const String& taskMode, const KURL&, const String& protocol);
    107107
    108108        RefPtr<ThreadableWebSocketChannelClientWrapper> m_workerClientWrapper;
     
    135135        Bridge(PassRefPtr<ThreadableWebSocketChannelClientWrapper>, PassRefPtr<WorkerContext>, const String& taskMode, const KURL&, const String& protocol);
    136136
    137         static void setWebSocketChannel(ScriptExecutionContext*, Bridge* thisPtr, Peer*, RefPtr<ThreadableWebSocketChannelClientWrapper>);
     137        static void setWebSocketChannel(ScriptExecutionContext*, Bridge* thisPtr, Peer*, PassRefPtr<ThreadableWebSocketChannelClientWrapper>);
    138138
    139139        // Executed on the main thread to create a Peer for this bridge.
    140         static void mainThreadCreateWebSocketChannel(ScriptExecutionContext*, Bridge* thisPtr, RefPtr<ThreadableWebSocketChannelClientWrapper>, const String& taskMode, const KURL&, const String& protocol);
     140        static void mainThreadCreateWebSocketChannel(ScriptExecutionContext*, Bridge* thisPtr, PassRefPtr<ThreadableWebSocketChannelClientWrapper>, const String& taskMode, const KURL&, const String& protocol);
    141141
    142142        // Executed on the worker context's thread.
Note: See TracChangeset for help on using the changeset viewer.