| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 if (WebThread* currentThread = platform->currentThread()) { | 86 if (WebThread* currentThread = platform->currentThread()) { |
| 87 DCHECK(!s_endOfTaskRunner); | 87 DCHECK(!s_endOfTaskRunner); |
| 88 s_endOfTaskRunner = new EndOfTaskRunner; | 88 s_endOfTaskRunner = new EndOfTaskRunner; |
| 89 currentThread->addTaskObserver(s_endOfTaskRunner); | 89 currentThread->addTaskObserver(s_endOfTaskRunner); |
| 90 } | 90 } |
| 91 } | 91 } |
| 92 | 92 |
| 93 void shutdown() { | 93 void shutdown() { |
| 94 ThreadState::current()->cleanupMainThread(); | 94 ThreadState::current()->cleanupMainThread(); |
| 95 | 95 |
| 96 // currentThread() is null if we are running on a thread without a message loo
p. | 96 // currentThread() is null if we are running on a thread without a message |
| 97 // loop. |
| 97 if (WebThread* currentThread = Platform::current()->currentThread()) { | 98 if (WebThread* currentThread = Platform::current()->currentThread()) { |
| 98 currentThread->removeTaskObserver(s_endOfTaskRunner); | 99 currentThread->removeTaskObserver(s_endOfTaskRunner); |
| 99 s_endOfTaskRunner = nullptr; | 100 s_endOfTaskRunner = nullptr; |
| 100 } | 101 } |
| 101 | 102 |
| 102 modulesInitializer().shutdown(); | 103 modulesInitializer().shutdown(); |
| 103 | 104 |
| 104 V8Initializer::shutdownMainThread(); | 105 V8Initializer::shutdownMainThread(); |
| 105 | 106 |
| 106 Platform::shutdown(); | 107 Platform::shutdown(); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 void MemoryPressureNotificationToWorkerThreadIsolates( | 154 void MemoryPressureNotificationToWorkerThreadIsolates( |
| 154 v8::MemoryPressureLevel level) { | 155 v8::MemoryPressureLevel level) { |
| 155 WorkerBackingThread::MemoryPressureNotificationToWorkerThreadIsolates(level); | 156 WorkerBackingThread::MemoryPressureNotificationToWorkerThreadIsolates(level); |
| 156 } | 157 } |
| 157 | 158 |
| 158 void setRAILModeOnWorkerThreadIsolates(v8::RAILMode railMode) { | 159 void setRAILModeOnWorkerThreadIsolates(v8::RAILMode railMode) { |
| 159 WorkerBackingThread::setRAILModeOnWorkerThreadIsolates(railMode); | 160 WorkerBackingThread::setRAILModeOnWorkerThreadIsolates(railMode); |
| 160 } | 161 } |
| 161 | 162 |
| 162 } // namespace blink | 163 } // namespace blink |
| OLD | NEW |