OLD | NEW |
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/V8GCController.h" | 8 #include "bindings/core/v8/V8GCController.h" |
9 #include "core/inspector/ConsoleMessage.h" | 9 #include "core/inspector/ConsoleMessage.h" |
10 #include "core/testing/DummyPageHolder.h" | 10 #include "core/testing/DummyPageHolder.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 // A null WorkerObjectProxy, supplied when creating CompositorWorkerThreads. | 68 // A null WorkerObjectProxy, supplied when creating CompositorWorkerThreads. |
69 class TestCompositorWorkerObjectProxy : public WorkerObjectProxy { | 69 class TestCompositorWorkerObjectProxy : public WorkerObjectProxy { |
70 public: | 70 public: |
71 static PassOwnPtr<TestCompositorWorkerObjectProxy> create(ExecutionContext*
context) | 71 static PassOwnPtr<TestCompositorWorkerObjectProxy> create(ExecutionContext*
context) |
72 { | 72 { |
73 return adoptPtr(new TestCompositorWorkerObjectProxy(context)); | 73 return adoptPtr(new TestCompositorWorkerObjectProxy(context)); |
74 } | 74 } |
75 | 75 |
76 // (Empty) WorkerReportingProxy implementation: | 76 // (Empty) WorkerReportingProxy implementation: |
77 virtual void reportException(const String& errorMessage, int lineNumber, int
columnNumber, const String& sourceURL, int exceptionId) {} | 77 virtual void reportException(const String& errorMessage, int lineNumber, int
columnNumber, const String& sourceURL, int exceptionId) {} |
78 void reportConsoleMessage(RawPtr<ConsoleMessage>) override {} | 78 void reportConsoleMessage(ConsoleMessage*) override {} |
79 void postMessageToPageInspector(const String&) override {} | 79 void postMessageToPageInspector(const String&) override {} |
80 void postWorkerConsoleAgentEnabled() override {} | 80 void postWorkerConsoleAgentEnabled() override {} |
81 | 81 |
82 void didEvaluateWorkerScript(bool success) override {} | 82 void didEvaluateWorkerScript(bool success) override {} |
83 void workerGlobalScopeStarted(WorkerGlobalScope*) override {} | 83 void workerGlobalScopeStarted(WorkerGlobalScope*) override {} |
84 void workerGlobalScopeClosed() override {} | 84 void workerGlobalScopeClosed() override {} |
85 void workerThreadTerminated() override {} | 85 void workerThreadTerminated() override {} |
86 void willDestroyWorkerGlobalScope() override {} | 86 void willDestroyWorkerGlobalScope() override {} |
87 | 87 |
88 ExecutionContext* getExecutionContext() override { return m_executionContext
.get(); } | 88 ExecutionContext* getExecutionContext() override { return m_executionContext
.get(); } |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 v8::Isolate* secondIsolate = secondWorker->isolate(); | 295 v8::Isolate* secondIsolate = secondWorker->isolate(); |
296 ASSERT(secondIsolate); | 296 ASSERT(secondIsolate); |
297 EXPECT_EQ(firstIsolate, secondIsolate); | 297 EXPECT_EQ(firstIsolate, secondIsolate); |
298 | 298 |
299 // Verify that the isolate can run some scripts correctly in the second work
er. | 299 // Verify that the isolate can run some scripts correctly in the second work
er. |
300 checkWorkerCanExecuteScript(secondWorker.get()); | 300 checkWorkerCanExecuteScript(secondWorker.get()); |
301 secondWorker->terminateAndWait(); | 301 secondWorker->terminateAndWait(); |
302 } | 302 } |
303 | 303 |
304 } // namespace blink | 304 } // namespace blink |
OLD | NEW |