| 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 12 matching lines...) Expand all Loading... |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #include "core/page/NetworkStateNotifier.h" | 26 #include "core/page/NetworkStateNotifier.h" |
| 27 | 27 |
| 28 #include "core/dom/CrossThreadTask.h" | 28 #include "core/dom/CrossThreadTask.h" |
| 29 #include "core/dom/ExecutionContext.h" | 29 #include "core/dom/ExecutionContext.h" |
| 30 #include "core/page/Page.h" | 30 #include "core/page/Page.h" |
| 31 #include "wtf/Assertions.h" | 31 #include "wtf/Assertions.h" |
| 32 #include "wtf/Functional.h" | 32 #include "wtf/Functional.h" |
| 33 #include "wtf/MainThread.h" | |
| 34 #include "wtf/StdLibExtras.h" | 33 #include "wtf/StdLibExtras.h" |
| 35 #include "wtf/Threading.h" | 34 #include "wtf/Threading.h" |
| 36 | 35 |
| 37 namespace blink { | 36 namespace blink { |
| 38 | 37 |
| 39 NetworkStateNotifier& networkStateNotifier() | 38 NetworkStateNotifier& networkStateNotifier() |
| 40 { | 39 { |
| 41 DEFINE_THREAD_SAFE_STATIC_LOCAL(NetworkStateNotifier, networkStateNotifier,
new NetworkStateNotifier); | 40 DEFINE_THREAD_SAFE_STATIC_LOCAL(NetworkStateNotifier, networkStateNotifier,
new NetworkStateNotifier); |
| 42 return networkStateNotifier; | 41 return networkStateNotifier; |
| 43 } | 42 } |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 | 182 |
| 184 list->zeroedObservers.clear(); | 183 list->zeroedObservers.clear(); |
| 185 | 184 |
| 186 if (list->observers.isEmpty()) { | 185 if (list->observers.isEmpty()) { |
| 187 MutexLocker locker(m_mutex); | 186 MutexLocker locker(m_mutex); |
| 188 m_observers.remove(context); // deletes list | 187 m_observers.remove(context); // deletes list |
| 189 } | 188 } |
| 190 } | 189 } |
| 191 | 190 |
| 192 } // namespace blink | 191 } // namespace blink |
| OLD | NEW |