| 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 "core/workers/WorkerBackingThread.h" | 5 #include "core/workers/WorkerBackingThread.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/V8Binding.h" | 7 #include "bindings/core/v8/V8Binding.h" |
| 8 #include "bindings/core/v8/V8GCController.h" | 8 #include "bindings/core/v8/V8GCController.h" |
| 9 #include "bindings/core/v8/V8IdleTaskRunner.h" | 9 #include "bindings/core/v8/V8IdleTaskRunner.h" |
| 10 #include "bindings/core/v8/V8Initializer.h" | 10 #include "bindings/core/v8/V8Initializer.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 } | 48 } |
| 49 | 49 |
| 50 WorkerBackingThread::WorkerBackingThread(const char* name, bool shouldCallGCOnSh
utdown) | 50 WorkerBackingThread::WorkerBackingThread(const char* name, bool shouldCallGCOnSh
utdown) |
| 51 : m_backingThread(WebThreadSupportingGC::create(name)) | 51 : m_backingThread(WebThreadSupportingGC::create(name)) |
| 52 , m_isOwningThread(true) | 52 , m_isOwningThread(true) |
| 53 , m_shouldCallGCOnShutdown(shouldCallGCOnShutdown) | 53 , m_shouldCallGCOnShutdown(shouldCallGCOnShutdown) |
| 54 { | 54 { |
| 55 } | 55 } |
| 56 | 56 |
| 57 WorkerBackingThread::WorkerBackingThread(WebThread* thread, bool shouldCallGCOnS
hutdown) | 57 WorkerBackingThread::WorkerBackingThread(WebThread* thread, bool shouldCallGCOnS
hutdown) |
| 58 : m_backingThread(WebThreadSupportingGC::createForThread(thread)) | 58 : m_backingThread(WebThreadSupportingGC::createForThread(thread, true)) |
| 59 , m_isOwningThread(false) | 59 , m_isOwningThread(false) |
| 60 , m_shouldCallGCOnShutdown(shouldCallGCOnShutdown) | 60 , m_shouldCallGCOnShutdown(shouldCallGCOnShutdown) |
| 61 { | 61 { |
| 62 } | 62 } |
| 63 | 63 |
| 64 WorkerBackingThread::~WorkerBackingThread() | 64 WorkerBackingThread::~WorkerBackingThread() |
| 65 { | 65 { |
| 66 } | 66 } |
| 67 | 67 |
| 68 void WorkerBackingThread::initialize() | 68 void WorkerBackingThread::initialize() |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 // static | 115 // static |
| 116 void WorkerBackingThread::setRAILModeOnWorkerThreadIsolates( | 116 void WorkerBackingThread::setRAILModeOnWorkerThreadIsolates( |
| 117 v8::RAILMode railMode) | 117 v8::RAILMode railMode) |
| 118 { | 118 { |
| 119 MutexLocker lock(isolatesMutex()); | 119 MutexLocker lock(isolatesMutex()); |
| 120 for (v8::Isolate* isolate : isolates()) | 120 for (v8::Isolate* isolate : isolates()) |
| 121 isolate->SetRAILMode(railMode); | 121 isolate->SetRAILMode(railMode); |
| 122 } | 122 } |
| 123 | 123 |
| 124 } // namespace blink | 124 } // namespace blink |
| OLD | NEW |