| 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 OwnPtrWillBeRawPtr<WorkerClients> clients = nullptr; | 140 OwnPtrWillBeRawPtr<WorkerClients> clients = nullptr; |
| 141 workerThread->start(WorkerThreadStartupData::create( | 141 workerThread->start(WorkerThreadStartupData::create( |
| 142 KURL(ParsedURLString, "http://fake.url/"), | 142 KURL(ParsedURLString, "http://fake.url/"), |
| 143 "fake user agent", | 143 "fake user agent", |
| 144 "//fake source code", | 144 "//fake source code", |
| 145 nullptr, | 145 nullptr, |
| 146 DontPauseWorkerGlobalScopeOnStart, | 146 DontPauseWorkerGlobalScopeOnStart, |
| 147 adoptPtr(new Vector<CSPHeaderAndType>()), | 147 adoptPtr(new Vector<CSPHeaderAndType>()), |
| 148 m_securityOrigin.get(), | 148 m_securityOrigin.get(), |
| 149 clients.release(), | 149 clients.release(), |
| 150 WebURLRequest::AddressSpaceLocal, |
| 150 V8CacheOptionsDefault)); | 151 V8CacheOptionsDefault)); |
| 151 return adoptPtr(workerThread); | 152 return adoptPtr(workerThread); |
| 152 } | 153 } |
| 153 | 154 |
| 154 void createWorkerAdapter(OwnPtr<CompositorWorkerThread>* workerThread, Waita
bleEvent* creationEvent) | 155 void createWorkerAdapter(OwnPtr<CompositorWorkerThread>* workerThread, Waita
bleEvent* creationEvent) |
| 155 { | 156 { |
| 156 *workerThread = createCompositorWorker(creationEvent); | 157 *workerThread = createCompositorWorker(creationEvent); |
| 157 } | 158 } |
| 158 | 159 |
| 159 // Attempts to run some simple script for |worker|. | 160 // Attempts to run some simple script for |worker|. |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 v8::Isolate* secondIsolate = secondWorker->isolate(); | 295 v8::Isolate* secondIsolate = secondWorker->isolate(); |
| 295 ASSERT(secondIsolate); | 296 ASSERT(secondIsolate); |
| 296 EXPECT_EQ(firstIsolate, secondIsolate); | 297 EXPECT_EQ(firstIsolate, secondIsolate); |
| 297 | 298 |
| 298 // 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. |
| 299 checkWorkerCanExecuteScript(secondWorker.get()); | 300 checkWorkerCanExecuteScript(secondWorker.get()); |
| 300 secondWorker->terminateAndWait(); | 301 secondWorker->terminateAndWait(); |
| 301 } | 302 } |
| 302 | 303 |
| 303 } // namespace blink | 304 } // namespace blink |
| OLD | NEW |