Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1965)

Unified Diff: Source/core/workers/SharedWorker.cpp

Issue 177073004: Oilpan: move core/workers to oilpan's heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698