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

Side by Side Diff: third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThreadTest.cpp

Issue 2204183002: Prepare CompositorWorker for per thread heap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/compositorworker/CompositorWorkerThread.h" 5 #include "modules/compositorworker/CompositorWorkerThread.h"
6 6
7 #include "bindings/core/v8/ScriptSourceCode.h" 7 #include "bindings/core/v8/ScriptSourceCode.h"
8 #include "bindings/core/v8/SourceLocation.h" 8 #include "bindings/core/v8/SourceLocation.h"
9 #include "bindings/core/v8/V8GCController.h" 9 #include "bindings/core/v8/V8GCController.h"
10 #include "bindings/core/v8/WorkerOrWorkletScriptController.h" 10 #include "bindings/core/v8/WorkerOrWorkletScriptController.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 Persistent<ExecutionContext> m_executionContext; 62 Persistent<ExecutionContext> m_executionContext;
63 }; 63 };
64 64
65 class TestCompositorProxyClient 65 class TestCompositorProxyClient
66 : public GarbageCollected<TestCompositorProxyClient> 66 : public GarbageCollected<TestCompositorProxyClient>
67 , public CompositorProxyClient { 67 , public CompositorProxyClient {
68 USING_GARBAGE_COLLECTED_MIXIN(TestCompositorProxyClient); 68 USING_GARBAGE_COLLECTED_MIXIN(TestCompositorProxyClient);
69 public: 69 public:
70 TestCompositorProxyClient() {} 70 TestCompositorProxyClient() {}
71 71
72 void dispose() override {}
72 void setGlobalScope(WorkerGlobalScope*) override {} 73 void setGlobalScope(WorkerGlobalScope*) override {}
73 void requestAnimationFrame() override {} 74 void requestAnimationFrame() override {}
74 void registerCompositorProxy(CompositorProxy*) override {} 75 void registerCompositorProxy(CompositorProxy*) override {}
75 void unregisterCompositorProxy(CompositorProxy*) override {} 76 void unregisterCompositorProxy(CompositorProxy*) override {}
76 }; 77 };
77 78
78 class CompositorWorkerTestPlatform : public TestingPlatformSupport { 79 class CompositorWorkerTestPlatform : public TestingPlatformSupport {
79 public: 80 public:
80 CompositorWorkerTestPlatform() 81 CompositorWorkerTestPlatform()
81 : m_thread(wrapUnique(m_oldPlatform->createThread("Compositor"))) 82 : m_thread(wrapUnique(m_oldPlatform->createThread("Compositor")))
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 v8::Isolate* secondIsolate = secondWorker->isolate(); 238 v8::Isolate* secondIsolate = secondWorker->isolate();
238 ASSERT_TRUE(secondIsolate); 239 ASSERT_TRUE(secondIsolate);
239 EXPECT_EQ(firstIsolate, secondIsolate); 240 EXPECT_EQ(firstIsolate, secondIsolate);
240 241
241 // Verify that the isolate can run some scripts correctly in the second work er. 242 // Verify that the isolate can run some scripts correctly in the second work er.
242 checkWorkerCanExecuteScript(secondWorker.get()); 243 checkWorkerCanExecuteScript(secondWorker.get());
243 secondWorker->terminateAndWait(); 244 secondWorker->terminateAndWait();
244 } 245 }
245 246
246 } // namespace blink 247 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698