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

Unified Diff: Source/core/workers/WorkerThreadTest.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/WorkerThreadTest.cpp
diff --git a/Source/core/workers/WorkerThreadTest.cpp b/Source/core/workers/WorkerThreadTest.cpp
index f0e7725a9f4825755b092979da7275632736e04c..f33e4f0f999237cd17ce4da1b7e8b33f8667d794 100644
--- a/Source/core/workers/WorkerThreadTest.cpp
+++ b/Source/core/workers/WorkerThreadTest.cpp
@@ -97,6 +97,15 @@ public:
return *m_thread;
}
+ OwnPtr<WorkerV8Isolate>& workerIsolate() override
+ {
+ if (!m_isolate) {
+ ASSERT(isCurrentThread());
+ m_isolate = WorkerV8Isolate::createDefault();
+ }
+ return m_isolate;
+ }
+
MOCK_METHOD1(doIdleGc, bool(double deadlineSeconds));
PassRefPtrWillBeRawPtr<WorkerGlobalScope> createWorkerGlobalScope(PassOwnPtr<WorkerThreadStartupData> startupData) override
@@ -106,6 +115,7 @@ public:
private:
OwnPtr<WebThreadSupportingGC> m_thread;
+ OwnPtr<WorkerV8Isolate> m_isolate;
};
class WakeupTask : public WebThread::Task {

Powered by Google App Engine
This is Rietveld 408576698