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

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

Issue 180743028: Oilpan: move Worker objects to the oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Have SharedWorkerRepositoryClient use transition type(s) Created 6 years, 9 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
« no previous file with comments | « Source/core/workers/Worker.h ('k') | Source/core/workers/Worker.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/workers/Worker.cpp
diff --git a/Source/core/workers/Worker.cpp b/Source/core/workers/Worker.cpp
index e5c76ceee5e97e9c068fbeca9e1892668cac78d6..12442f1fa2c245a67a0163976b45d03a59cd376c 100644
--- a/Source/core/workers/Worker.cpp
+++ b/Source/core/workers/Worker.cpp
@@ -50,7 +50,7 @@ inline Worker::Worker(ExecutionContext* context)
ScriptWrappable::init(this);
}
-PassRefPtr<Worker> Worker::create(ExecutionContext* context, const String& url, ExceptionState& exceptionState)
+PassRefPtrWillBeRawPtr<Worker> Worker::create(ExecutionContext* context, const String& url, ExceptionState& exceptionState)
{
ASSERT(isMainThread());
Document* document = toDocument(context);
@@ -62,7 +62,7 @@ PassRefPtr<Worker> Worker::create(ExecutionContext* context, const String& url,
WorkerGlobalScopeProxyProvider* proxyProvider = WorkerGlobalScopeProxyProvider::from(*document->page());
ASSERT(proxyProvider);
- RefPtr<Worker> worker = adoptRef(new Worker(context));
+ RefPtrWillBeRawPtr<Worker> worker = adoptRefWillBeRefCountedGarbageCollected(new Worker(context));
worker->suspendIfNeeded();
@@ -103,7 +103,8 @@ void Worker::postMessage(PassRefPtr<SerializedScriptValue> message, const Messag
void Worker::terminate()
{
- m_contextProxy->terminateWorkerGlobalScope();
+ if (m_contextProxy)
+ m_contextProxy->terminateWorkerGlobalScope();
}
void Worker::stop()
@@ -137,4 +138,9 @@ void Worker::notifyFinished()
unsetPendingActivity(this);
}
+void Worker::trace(Visitor* visitor)
+{
+ AbstractWorker::trace(visitor);
+}
+
} // namespace WebCore
« no previous file with comments | « Source/core/workers/Worker.h ('k') | Source/core/workers/Worker.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698