Changeset 92108 in webkit


Ignore:
Timestamp:
Aug 1, 2011 1:49:06 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

Custom cursors cause the WebProcess to crash
https://bugs.webkit.org/show_bug.cgi?id=64802

Patch by Amruth Raj <amruthraj@motorola.com> on 2011-08-01
Reviewed by Darin Adler.

  • Shared/WebCoreArgumentCoders.cpp:

(CoreIPC::::encode): In case of a NULL cursor image, encode a bool indicating that.
(CoreIPC::::decode): Decode the image only if required.

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r92079 r92108  
     12011-08-01  Amruth Raj  <amruthraj@motorola.com>
     2
     3        Custom cursors cause the WebProcess to crash
     4        https://bugs.webkit.org/show_bug.cgi?id=64802
     5
     6        Reviewed by Darin Adler.
     7
     8        * Shared/WebCoreArgumentCoders.cpp:
     9        (CoreIPC::::encode): In case of a NULL cursor image, encode a bool indicating that.
     10        (CoreIPC::::decode): Decode the image only if required.
     11
    1122011-07-31  Daniel Bates  <dbates@webkit.org>
    213
  • trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp

    r90705 r92108  
    322322        return;
    323323
     324    if (cursor.image()->isNull()) {
     325        encoder->encodeBool(false); // There is no valid image being encoded.
     326        return;
     327    }
     328
     329    encoder->encodeBool(true);
    324330    encodeImage(encoder, cursor.image());
    325331    encoder->encode(cursor.hotSpot());
     
    342348
    343349        cursor = cursorReference;
     350        return true;
     351    }
     352
     353    bool isValidImagePresent;
     354    if (!decoder->decode(isValidImagePresent))
     355        return false;
     356
     357    if (!isValidImagePresent) {
     358        cursor = Cursor(Image::nullImage(), IntPoint());
    344359        return true;
    345360    }
Note: See TracChangeset for help on using the changeset viewer.