⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 176679 in webkit


Ignore:
Timestamp:
Dec 2, 2014, 11:37:08 AM (12 years ago)
Author:
dburkart@apple.com
Message:

Merged r176474. rdar://problems/19063717

Location:
branches/safari-600.3-branch/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-600.3-branch/Source/WebKit2/ChangeLog

    r176666 r176679  
     12014-12-02  Dana Burkart  <dburkart@apple.com>
     2
     3        Merge r176474. <rdar://problem/19063717>
     4
     5    2014-11-21  Tim Horton  <timothy_horton@apple.com>
     6
     7            Crashes while encoding a TextIndicator with no contentImageWithHighlight
     8            https://bugs.webkit.org/show_bug.cgi?id=138984
     9            <rdar://problem/19063717>
     10
     11            Reviewed by Sam Weinig.
     12
     13            * Shared/WebCoreArgumentCoders.cpp:
     14            (IPC::ArgumentCoder<TextIndicatorData>::encode):
     15            (IPC::ArgumentCoder<TextIndicatorData>::decode):
     16            encodeImage doesn't deal with null images, so handle that case gracefully.
     17
     18
    1192014-12-02  Dana Burkart  <dburkart@apple.com>
    220
  • branches/safari-600.3-branch/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp

    r176661 r176679  
    21782178    encoder << textIndicatorData.contentImageScaleFactor;
    21792179    encoder.encodeEnum(textIndicatorData.presentationTransition);
    2180     encodeImage(encoder, textIndicatorData.contentImage.get());
    2181     encodeImage(encoder, textIndicatorData.contentImageWithHighlight.get());
     2180
     2181    bool hasImage = textIndicatorData.contentImage;
     2182    encoder << hasImage;
     2183    if (hasImage)
     2184        encodeImage(encoder, textIndicatorData.contentImage.get());
     2185
     2186    bool hasImageWithHighlight = textIndicatorData.contentImageWithHighlight;
     2187    encoder << hasImageWithHighlight;
     2188    if (hasImageWithHighlight)
     2189        encodeImage(encoder, textIndicatorData.contentImageWithHighlight.get());
    21822190}
    21832191
     
    21992207        return false;
    22002208
    2201     if (!decodeImage(decoder, textIndicatorData.contentImage))
    2202         return false;
    2203 
    2204     if (!decodeImage(decoder, textIndicatorData.contentImageWithHighlight))
     2209    bool hasImage;
     2210    if (!decoder.decode(hasImage))
     2211        return false;
     2212    if (hasImage && !decodeImage(decoder, textIndicatorData.contentImage))
     2213        return false;
     2214
     2215    bool hasImageWithHighlight;
     2216    if (!decoder.decode(hasImageWithHighlight))
     2217        return false;
     2218    if (hasImageWithHighlight && !decodeImage(decoder, textIndicatorData.contentImageWithHighlight))
    22052219        return false;
    22062220
Note: See TracChangeset for help on using the changeset viewer.