Changeset 167390 in webkit


Ignore:
Timestamp:
Apr 16, 2014 3:04:17 PM (10 years ago)
Author:
Simon Fraser
Message:

Failing to decode a layer tree commit message resulted in silent and mysterious failure
https://bugs.webkit.org/show_bug.cgi?id=131766
<rdar://problem/16520894>

Reviewed by Sam Weinig.

If the message decode failed, we should have already marked the message as invalid.
Failing to do so indicates in a decode code coding error.

  • Platform/IPC/HandleMessage.h:

(IPC::handleMessage):
(IPC::handleMessageVariadic):
(IPC::handleMessageDelayed):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r167388 r167390  
     12014-04-16  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Failing to decode a layer tree commit message resulted in silent and mysterious failure
     4        https://bugs.webkit.org/show_bug.cgi?id=131766
     5        <rdar://problem/16520894>
     6
     7        Reviewed by Sam Weinig.
     8       
     9        If the message decode failed, we should have already marked the message as invalid.
     10        Failing to do so indicates in a decode code coding error.
     11
     12        * Platform/IPC/HandleMessage.h:
     13        (IPC::handleMessage):
     14        (IPC::handleMessageVariadic):
     15        (IPC::handleMessageDelayed):
     16
    1172014-04-16  Tim Horton  <timothy_horton@apple.com>
    218
  • trunk/Source/WebKit2/Platform/IPC/HandleMessage.h

    r161745 r167390  
    113113{
    114114    typename T::DecodeType arguments;
    115     if (!decoder.decode(arguments))
    116         return;
     115    if (!decoder.decode(arguments)) {
     116        ASSERT(decoder.isInvalid());
     117        return;
     118    }
     119
    117120    callMemberFunction(std::move(arguments), object, function);
    118121}
     
    122125{
    123126    typename T::DecodeType arguments;
    124     if (!decoder.decode(arguments))
    125         return;
     127    if (!decoder.decode(arguments)) {
     128        ASSERT(decoder.isInvalid());
     129        return;
     130    }
    126131
    127132    typename T::Reply::ValueType replyArguments;
     
    134139{
    135140    typename T::DecodeType arguments;
    136     if (!decoder.decode(arguments))
    137         return;
     141    if (!decoder.decode(arguments)) {
     142        ASSERT(decoder.isInvalid());
     143        return;
     144    }
    138145
    139146    typename T::Reply::ValueType replyArguments;
     
    146153{
    147154    typename T::DecodeType arguments;
    148     if (!decoder.decode(arguments))
    149         return;
     155    if (!decoder.decode(arguments)) {
     156        ASSERT(decoder.isInvalid());
     157        return;
     158    }
    150159    callMemberFunction(connection, std::move(arguments), object, function);
    151160}
     
    155164{
    156165    typename T::DecodeType arguments;
    157     if (!decoder.decode(arguments))
    158         return;
     166    if (!decoder.decode(arguments)) {
     167        ASSERT(decoder.isInvalid());
     168        return;
     169    }
    159170    callMemberFunction(std::move(arguments), decoder, object, function);
    160171}
     
    164175{
    165176    typename T::DecodeType arguments;
    166     if (!decoder.decode(arguments))
    167         return;
     177    if (!decoder.decode(arguments)) {
     178        ASSERT(decoder.isInvalid());
     179        return;
     180    }
    168181
    169182    typename T::Reply::ValueType replyArguments;
     
    176189{
    177190    typename T::DecodeType arguments;
    178     if (!decoder.decode(arguments))
    179         return;
     191    if (!decoder.decode(arguments)) {
     192        ASSERT(decoder.isInvalid());
     193        return;
     194    }
    180195
    181196    RefPtr<typename T::DelayedReply> delayedReply = adoptRef(new typename T::DelayedReply(connection, std::move(replyEncoder)));
Note: See TracChangeset for help on using the changeset viewer.