| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 { | 269 { |
| 270 } | 270 } |
| 271 | 271 |
| 272 void NEVER_INLINE checkThread() | 272 void NEVER_INLINE checkThread() |
| 273 { | 273 { |
| 274 // Function with SameThreadAffinity, including SameThreadClosure | 274 // Function with SameThreadAffinity, including SameThreadClosure |
| 275 // created by WTF::bind() or blink::createSameThreadTask(), | 275 // created by WTF::bind() or blink::createSameThreadTask(), |
| 276 // must be called and destructed on the thread where it is created. | 276 // must be called and destructed on the thread where it is created. |
| 277 // If it is intended to be used cross-thread, use | 277 // If it is intended to be used cross-thread, use |
| 278 // blink::threadSafeBind() or blink::createCrossThreadTask() instead. | 278 // blink::threadSafeBind() or blink::createCrossThreadTask() instead. |
| 279 RELEASE_ASSERT(m_createdThread == currentThread()); | 279 CHECK_EQ(m_createdThread, currentThread()); |
| 280 } | 280 } |
| 281 | 281 |
| 282 private: | 282 private: |
| 283 const ThreadIdentifier m_createdThread; | 283 const ThreadIdentifier m_createdThread; |
| 284 }; | 284 }; |
| 285 #endif | 285 #endif |
| 286 | 286 |
| 287 template <FunctionThreadAffinity threadAffinity, typename BoundParametersTuple,
typename FunctionWrapper, typename... UnboundParameters> | 287 template <FunctionThreadAffinity threadAffinity, typename BoundParametersTuple,
typename FunctionWrapper, typename... UnboundParameters> |
| 288 class PartBoundFunctionImpl; | 288 class PartBoundFunctionImpl; |
| 289 | 289 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 | 346 |
| 347 } // namespace WTF | 347 } // namespace WTF |
| 348 | 348 |
| 349 using WTF::passed; | 349 using WTF::passed; |
| 350 using WTF::Function; | 350 using WTF::Function; |
| 351 using WTF::bind; | 351 using WTF::bind; |
| 352 using WTF::SameThreadClosure; | 352 using WTF::SameThreadClosure; |
| 353 using WTF::CrossThreadClosure; | 353 using WTF::CrossThreadClosure; |
| 354 | 354 |
| 355 #endif // WTF_Functional_h | 355 #endif // WTF_Functional_h |
| OLD | NEW |