Changeset 212139 in webkit


Ignore:
Timestamp:
Feb 10, 2017 1:08:32 PM (7 years ago)
Author:
commit-queue@webkit.org
Message:

Fix misleading comment in RunLoop.h
https://bugs.webkit.org/show_bug.cgi?id=167832

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-02-10
Reviewed by Sam Weinig.

  • wtf/RunLoop.h:

Mac initialization used to force using CFRunLoopGetMain(). Now however it just
uses RunLoop::current which uses CFRunLoopGetCurrent(). So this comment that
it can be done on any thread is misleading and can lead to incorrect behavior
if it is actually done on a non-main thread on Mac.

Location:
trunk/Source/WTF
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r212042 r212139  
     12017-02-10  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Fix misleading comment in RunLoop.h
     4        https://bugs.webkit.org/show_bug.cgi?id=167832
     5
     6        Reviewed by Sam Weinig.
     7
     8        * wtf/RunLoop.h:
     9        Mac initialization used to force using CFRunLoopGetMain(). Now however it just
     10        uses RunLoop::current which uses CFRunLoopGetCurrent(). So this comment that
     11        it can be done on any thread is misleading and can lead to incorrect behavior
     12        if it is actually done on a non-main thread on Mac.
     13
    1142017-02-09  Alex Christensen  <achristensen@webkit.org>
    215
  • trunk/Source/WTF/wtf/RunLoop.cpp

    r202439 r212139  
    5151void RunLoop::initializeMainRunLoop()
    5252{
     53#if OS(DARWIN)
     54    ASSERT(pthread_main_np());
     55#endif
    5356    if (s_mainRunLoop)
    5457        return;
  • trunk/Source/WTF/wtf/RunLoop.h

    r211469 r212139  
    5151    WTF_MAKE_NONCOPYABLE(RunLoop);
    5252public:
    53     // Must be called from the main thread (except for the Mac platform, where it
    54     // can be called from any thread).
     53    // Must be called from the main thread.
    5554    WTF_EXPORT_PRIVATE static void initializeMainRunLoop();
    5655
Note: See TracChangeset for help on using the changeset viewer.