| 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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 { | 299 { |
| 300 } | 300 } |
| 301 | 301 |
| 302 void NEVER_INLINE checkThread() | 302 void NEVER_INLINE checkThread() |
| 303 { | 303 { |
| 304 // Function with SameThreadAffinity, including SameThreadClosure | 304 // Function with SameThreadAffinity, including SameThreadClosure |
| 305 // created by WTF::bind() or blink::createSameThreadTask(), | 305 // created by WTF::bind() or blink::createSameThreadTask(), |
| 306 // must be called and destructed on the thread where it is created. | 306 // must be called and destructed on the thread where it is created. |
| 307 // If it is intended to be used cross-thread, use | 307 // If it is intended to be used cross-thread, use |
| 308 // blink::threadSafeBind() or blink::createCrossThreadTask() instead. | 308 // blink::threadSafeBind() or blink::createCrossThreadTask() instead. |
| 309 CHECK_EQ(m_createdThread, currentThread()); | 309 RELEASE_ASSERT(m_createdThread == currentThread()); |
| 310 } | 310 } |
| 311 | 311 |
| 312 private: | 312 private: |
| 313 const ThreadIdentifier m_createdThread; | 313 const ThreadIdentifier m_createdThread; |
| 314 }; | 314 }; |
| 315 #endif | 315 #endif |
| 316 | 316 |
| 317 template <FunctionThreadAffinity threadAffinity, typename BoundParametersTuple,
typename FunctionWrapper, typename... UnboundParameters> | 317 template <FunctionThreadAffinity threadAffinity, typename BoundParametersTuple,
typename FunctionWrapper, typename... UnboundParameters> |
| 318 class PartBoundFunctionImpl; | 318 class PartBoundFunctionImpl; |
| 319 | 319 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 | 376 |
| 377 } // namespace WTF | 377 } // namespace WTF |
| 378 | 378 |
| 379 using WTF::passed; | 379 using WTF::passed; |
| 380 using WTF::Function; | 380 using WTF::Function; |
| 381 using WTF::bind; | 381 using WTF::bind; |
| 382 using WTF::SameThreadClosure; | 382 using WTF::SameThreadClosure; |
| 383 using WTF::CrossThreadClosure; | 383 using WTF::CrossThreadClosure; |
| 384 | 384 |
| 385 #endif // WTF_Functional_h | 385 #endif // WTF_Functional_h |
| OLD | NEW |