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

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

Issue 1158443008: compositor-worker: Share a thread and an isolate for compositor workers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 5 years, 7 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/DedicatedWorkerThread.cpp
diff --git a/Source/core/workers/DedicatedWorkerThread.cpp b/Source/core/workers/DedicatedWorkerThread.cpp
index 1567ddae3959d8e776c248f24f642644a0ffae52..130b9b6f5c04c5dbc5c221bc3256555eaffcda45 100644
--- a/Source/core/workers/DedicatedWorkerThread.cpp
+++ b/Source/core/workers/DedicatedWorkerThread.cpp
@@ -66,6 +66,15 @@ WebThreadSupportingGC& DedicatedWorkerThread::backingThread()
return *m_thread.get();
}
+OwnPtr<WorkerV8Isolate>& DedicatedWorkerThread::workerIsolate()
+{
+ if (!m_isolate) {
+ ASSERT(isCurrentThread());
+ m_isolate = WorkerV8Isolate::createDefault();
+ }
+ return m_isolate;
+}
+
void DedicatedWorkerThread::postInitialize()
{
// Notify the parent object of our current active state before the event

Powered by Google App Engine
This is Rietveld 408576698