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

Unified Diff: Source/core/workers/SharedWorkerThread.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/SharedWorkerThread.cpp
diff --git a/Source/core/workers/SharedWorkerThread.cpp b/Source/core/workers/SharedWorkerThread.cpp
index 576361da373a45a004afa3888df1cff46ad59773..f4a0ba11abc62d02c53f9b64dc6155c1166113e0 100644
--- a/Source/core/workers/SharedWorkerThread.cpp
+++ b/Source/core/workers/SharedWorkerThread.cpp
@@ -64,4 +64,13 @@ WebThreadSupportingGC& SharedWorkerThread::backingThread()
return *m_thread.get();
}
+OwnPtr<WorkerV8Isolate>& SharedWorkerThread::workerIsolate()
+{
+ if (!m_isolate) {
+ ASSERT(isCurrentThread());
+ m_isolate = WorkerV8Isolate::createDefault();
+ }
+ return m_isolate;
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698