OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 { | 64 { |
65 Microtask::performCheckpoint(); | 65 Microtask::performCheckpoint(); |
66 V8Initializer::reportRejectedPromises(); | 66 V8Initializer::reportRejectedPromises(); |
67 } | 67 } |
68 }; | 68 }; |
69 | 69 |
70 } // namespace | 70 } // namespace |
71 | 71 |
72 static Mutex& threadSetMutex() | 72 static Mutex& threadSetMutex() |
73 { | 73 { |
74 AtomicallyInitializedStatic(Mutex&, mutex = *new Mutex); | 74 AtomicallyInitializedStaticReference(Mutex, mutex, new Mutex); |
75 return mutex; | 75 return mutex; |
76 } | 76 } |
77 | 77 |
78 static HashSet<WorkerThread*>& workerThreads() | 78 static HashSet<WorkerThread*>& workerThreads() |
79 { | 79 { |
80 DEFINE_STATIC_LOCAL(HashSet<WorkerThread*>, threads, ()); | 80 DEFINE_STATIC_LOCAL(HashSet<WorkerThread*>, threads, ()); |
81 return threads; | 81 return threads; |
82 } | 82 } |
83 | 83 |
84 unsigned WorkerThread::workerThreadCount() | 84 unsigned WorkerThread::workerThreadCount() |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 InspectorInstrumentation::didLeaveNestedRunLoop(m_workerGlobalScope.get()); | 532 InspectorInstrumentation::didLeaveNestedRunLoop(m_workerGlobalScope.get()); |
533 } | 533 } |
534 | 534 |
535 void WorkerThread::setWorkerInspectorController(WorkerInspectorController* worke
rInspectorController) | 535 void WorkerThread::setWorkerInspectorController(WorkerInspectorController* worke
rInspectorController) |
536 { | 536 { |
537 MutexLocker locker(m_workerInspectorControllerMutex); | 537 MutexLocker locker(m_workerInspectorControllerMutex); |
538 m_workerInspectorController = workerInspectorController; | 538 m_workerInspectorController = workerInspectorController; |
539 } | 539 } |
540 | 540 |
541 } // namespace blink | 541 } // namespace blink |
OLD | NEW |