Changeset 85088 in webkit


Ignore:
Timestamp:
Apr 27, 2011 2:05:20 PM (13 years ago)
Author:
andersca@apple.com
Message:

2011-04-27 Anders Carlsson <andersca@apple.com>

Reviewed by Dan Bernstein.

Hang if a sync message handler invalidates the connection
https://bugs.webkit.org/show_bug.cgi?id=59627

If dispatching incoming messages while waiting for the sync reply caused the connection to be invalidated,
we need to return early or we'll wait forever.

  • Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::waitForSyncReply):
Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r85059 r85088  
     12011-04-27  Anders Carlsson  <andersca@apple.com>
     2
     3        Reviewed by Dan Bernstein.
     4
     5        Hang if a sync message handler invalidates the connection
     6        https://bugs.webkit.org/show_bug.cgi?id=59627
     7
     8        If dispatching incoming messages while waiting for the sync reply caused the connection to be invalidated,
     9        we need to return early or we'll wait forever.
     10
     11        * Platform/CoreIPC/Connection.cpp:
     12        (CoreIPC::Connection::waitForSyncReply):
     13
    1142011-04-27  Carlos Garcia Campos  <cgarcia@igalia.com>
    215
  • trunk/Source/WebKit2/Platform/CoreIPC/Connection.cpp

    r84886 r85088  
    436436        }
    437437
     438        // Processing a sync message could cause the connection to be invalidated.
     439        // (If the handler ends up calling Connection::invalidate).
     440        // If that happens, we need to stop waiting, or we'll hang since we won't get
     441        // any more incoming messages.
     442        if (!isValid())
     443            return 0;
     444
    438445        // We didn't find a sync reply yet, keep waiting.
    439446#if PLATFORM(WIN)
Note: See TracChangeset for help on using the changeset viewer.