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