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

Unified Diff: Source/modules/serviceworkers/ServiceWorkerThread.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/modules/serviceworkers/ServiceWorkerThread.cpp
diff --git a/Source/modules/serviceworkers/ServiceWorkerThread.cpp b/Source/modules/serviceworkers/ServiceWorkerThread.cpp
index 3a27a068169248e12f9213c16467cded55242b09..9ce0a57131fa10d49f0e60be3158703394351d6b 100644
--- a/Source/modules/serviceworkers/ServiceWorkerThread.cpp
+++ b/Source/modules/serviceworkers/ServiceWorkerThread.cpp
@@ -63,4 +63,13 @@ WebThreadSupportingGC& ServiceWorkerThread::backingThread()
return *m_thread.get();
}
+OwnPtr<WorkerV8Isolate>& ServiceWorkerThread::workerIsolate()
+{
+ if (!m_isolate) {
+ ASSERT(isCurrentThread());
+ m_isolate = WorkerV8Isolate::createDefault();
+ }
+ return m_isolate;
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698