Index: Source/core/workers/SharedWorker.cpp |
diff --git a/Source/core/workers/SharedWorker.cpp b/Source/core/workers/SharedWorker.cpp |
index 4c6506316428b2582707c5e258336a4be5e85253..c55c6a5e453bdf301c40c2063c5242c36bf662dd 100644 |
--- a/Source/core/workers/SharedWorker.cpp |
+++ b/Source/core/workers/SharedWorker.cpp |
@@ -54,16 +54,16 @@ inline SharedWorker::SharedWorker(ExecutionContext* context) |
ScriptWrappable::init(this); |
} |
-PassRefPtr<SharedWorker> SharedWorker::create(ExecutionContext* context, const String& url, const String& name, ExceptionState& exceptionState) |
+PassRefPtrWillBeRawPtr<SharedWorker> SharedWorker::create(ExecutionContext* context, const String& url, const String& name, ExceptionState& exceptionState) |
{ |
ASSERT(isMainThread()); |
ASSERT_WITH_SECURITY_IMPLICATION(context->isDocument()); |
UseCounter::count(context, UseCounter::SharedWorkerStart); |
- RefPtr<SharedWorker> worker = adoptRef(new SharedWorker(context)); |
+ RefPtrWillBeRawPtr<SharedWorker> worker = adoptRefCountedWillBeRefCountedGarbageCollected(new SharedWorker(context)); |
- RefPtr<MessageChannel> channel = MessageChannel::create(context); |
+ RefPtrWillBeRawPtr<MessageChannel> channel = MessageChannel::create(context); |
worker->m_port = channel->port1(); |
OwnPtr<blink::WebMessagePortChannel> remotePort = channel->port2()->disentangle(); |
ASSERT(remotePort); |
@@ -106,4 +106,9 @@ void SharedWorker::unsetPreventGC() |
unsetPendingActivity(this); |
} |
+void SharedWorker::trace(Visitor* visitor) |
+{ |
+ visitor->trace(m_port); |
+} |
+ |
} // namespace WebCore |