| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "bindings/core/v8/SourceLocation.h" | 5 #include "bindings/core/v8/SourceLocation.h" |
| 6 #include "bindings/core/v8/V8CacheOptions.h" | 6 #include "bindings/core/v8/V8CacheOptions.h" |
| 7 #include "bindings/core/v8/V8GCController.h" | 7 #include "bindings/core/v8/V8GCController.h" |
| 8 #include "core/frame/csp/ContentSecurityPolicy.h" | 8 #include "core/frame/csp/ContentSecurityPolicy.h" |
| 9 #include "core/inspector/ConsoleMessage.h" | 9 #include "core/inspector/ConsoleMessage.h" |
| 10 #include "core/workers/WorkerBackingThread.h" | 10 #include "core/workers/WorkerBackingThread.h" |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 "fake user agent", | 118 "fake user agent", |
| 119 source, | 119 source, |
| 120 nullptr, | 120 nullptr, |
| 121 DontPauseWorkerGlobalScopeOnStart, | 121 DontPauseWorkerGlobalScopeOnStart, |
| 122 headers.get(), | 122 headers.get(), |
| 123 "", | 123 "", |
| 124 securityOrigin, | 124 securityOrigin, |
| 125 clients, | 125 clients, |
| 126 WebAddressSpaceLocal, | 126 WebAddressSpaceLocal, |
| 127 nullptr, | 127 nullptr, |
| 128 nullptr, |
| 128 V8CacheOptionsDefault)); | 129 V8CacheOptionsDefault)); |
| 129 } | 130 } |
| 130 | 131 |
| 131 void waitForInit() | 132 void waitForInit() |
| 132 { | 133 { |
| 133 std::unique_ptr<WaitableEvent> completionEvent = wrapUnique(new Waitable
Event()); | 134 std::unique_ptr<WaitableEvent> completionEvent = wrapUnique(new Waitable
Event()); |
| 134 workerBackingThread().backingThread().postTask(BLINK_FROM_HERE, crossThr
eadBind(&WaitableEvent::signal, crossThreadUnretained(completionEvent.get()))); | 135 workerBackingThread().backingThread().postTask(BLINK_FROM_HERE, crossThr
eadBind(&WaitableEvent::signal, crossThreadUnretained(completionEvent.get()))); |
| 135 completionEvent->wait(); | 136 completionEvent->wait(); |
| 136 } | 137 } |
| 137 | 138 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 private: | 171 private: |
| 171 WorkerThreadForTest* m_thread; | 172 WorkerThreadForTest* m_thread; |
| 172 }; | 173 }; |
| 173 | 174 |
| 174 inline WorkerGlobalScope* WorkerThreadForTest::createWorkerGlobalScope(std::uniq
ue_ptr<WorkerThreadStartupData> startupData) | 175 inline WorkerGlobalScope* WorkerThreadForTest::createWorkerGlobalScope(std::uniq
ue_ptr<WorkerThreadStartupData> startupData) |
| 175 { | 176 { |
| 176 return new FakeWorkerGlobalScope(startupData->m_scriptURL, startupData->m_us
erAgent, this, std::move(startupData->m_starterOriginPrivilegeData), std::move(s
tartupData->m_workerClients)); | 177 return new FakeWorkerGlobalScope(startupData->m_scriptURL, startupData->m_us
erAgent, this, std::move(startupData->m_starterOriginPrivilegeData), std::move(s
tartupData->m_workerClients)); |
| 177 } | 178 } |
| 178 | 179 |
| 179 } // namespace blink | 180 } // namespace blink |
| OLD | NEW |