Modified: trunk/Source/WebCore/ChangeLog (92842 => 92843)
--- trunk/Source/WebCore/ChangeLog 2011-08-11 13:59:08 UTC (rev 92842)
+++ trunk/Source/WebCore/ChangeLog 2011-08-11 14:00:57 UTC (rev 92843)
@@ -1,3 +1,24 @@
+2011-08-11 Yuta Kitamura <[email protected]>
+
+ WebSocket: Use PassRefPtr<> in function arguments in WorkerThreadableWebSocketChannel.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=66047
+
+ Reviewed by Kent Tamura.
+
+ It's safe to use PassRefPtr<> in these functions because:
+ - CrossThreadTask knows how to pass a RefPtr<> across threads, and
+ - Call sites do not pass the pointers to anywhere else.
+
+ No change in functionality, thus no new tests.
+
+ * websockets/WorkerThreadableWebSocketChannel.cpp:
+ (WebCore::workerContextDidSend):
+ (WebCore::workerContextDidGetBufferedAmount):
+ (WebCore::workerContextDidConnect):
+ (WebCore::workerContextDidReceiveMessage):
+ (WebCore::workerContextDidStartClosingHandshake):
+ (WebCore::workerContextDidClose):
+
2011-08-11 Pavel Feldman <[email protected]>
Web Inspector: [Mac] search as you type does not work with the new indent in the script selector.
Modified: trunk/Source/WebCore/websockets/WorkerThreadableWebSocketChannel.cpp (92842 => 92843)
--- trunk/Source/WebCore/websockets/WorkerThreadableWebSocketChannel.cpp 2011-08-11 13:59:08 UTC (rev 92842)
+++ trunk/Source/WebCore/websockets/WorkerThreadableWebSocketChannel.cpp 2011-08-11 14:00:57 UTC (rev 92843)
@@ -151,7 +151,7 @@
m_mainWebSocketChannel->connect(url, protocol);
}
-static void workerContextDidSend(ScriptExecutionContext* context, RefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper, bool sent)
+static void workerContextDidSend(ScriptExecutionContext* context, PassRefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper, bool sent)
{
ASSERT_UNUSED(context, context->isWorkerContext());
workerClientWrapper->setSent(sent);
@@ -166,7 +166,7 @@
m_loaderProxy.postTaskForModeToWorkerContext(createCallbackTask(&workerContextDidSend, m_workerClientWrapper, sent), m_taskMode);
}
-static void workerContextDidGetBufferedAmount(ScriptExecutionContext* context, RefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper, unsigned long bufferedAmount)
+static void workerContextDidGetBufferedAmount(ScriptExecutionContext* context, PassRefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper, unsigned long bufferedAmount)
{
ASSERT_UNUSED(context, context->isWorkerContext());
workerClientWrapper->setBufferedAmount(bufferedAmount);
@@ -222,7 +222,7 @@
m_mainWebSocketChannel->resume();
}
-static void workerContextDidConnect(ScriptExecutionContext* context, RefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper)
+static void workerContextDidConnect(ScriptExecutionContext* context, PassRefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper)
{
ASSERT_UNUSED(context, context->isWorkerContext());
workerClientWrapper->didConnect();
@@ -234,7 +234,7 @@
m_loaderProxy.postTaskForModeToWorkerContext(createCallbackTask(&workerContextDidConnect, m_workerClientWrapper), m_taskMode);
}
-static void workerContextDidReceiveMessage(ScriptExecutionContext* context, RefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper, const String& message)
+static void workerContextDidReceiveMessage(ScriptExecutionContext* context, PassRefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper, const String& message)
{
ASSERT_UNUSED(context, context->isWorkerContext());
workerClientWrapper->didReceiveMessage(message);
@@ -246,7 +246,7 @@
m_loaderProxy.postTaskForModeToWorkerContext(createCallbackTask(&workerContextDidReceiveMessage, m_workerClientWrapper, message), m_taskMode);
}
-static void workerContextDidStartClosingHandshake(ScriptExecutionContext* context, RefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper)
+static void workerContextDidStartClosingHandshake(ScriptExecutionContext* context, PassRefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper)
{
ASSERT_UNUSED(context, context->isWorkerContext());
workerClientWrapper->didStartClosingHandshake();
@@ -258,7 +258,7 @@
m_loaderProxy.postTaskForModeToWorkerContext(createCallbackTask(&workerContextDidStartClosingHandshake, m_workerClientWrapper), m_taskMode);
}
-static void workerContextDidClose(ScriptExecutionContext* context, RefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper, unsigned long unhandledBufferedAmount, WebSocketChannelClient::ClosingHandshakeCompletionStatus closingHandshakeCompletion)
+static void workerContextDidClose(ScriptExecutionContext* context, PassRefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper, unsigned long unhandledBufferedAmount, WebSocketChannelClient::ClosingHandshakeCompletionStatus closingHandshakeCompletion)
{
ASSERT_UNUSED(context, context->isWorkerContext());
workerClientWrapper->didClose(unhandledBufferedAmount, closingHandshakeCompletion);