Title: [92183] trunk/Source
- Revision
- 92183
- Author
- commit-qu...@webkit.org
- Date
- 2011-08-02 06:39:26 -0700 (Tue, 02 Aug 2011)
Log Message
Custom cursors cause the WebProcess to crash
https://bugs.webkit.org/show_bug.cgi?id=64802
Patch by Amruth Raj <amruth...@motorola.com> on 2011-08-02
Reviewed by Martin Robinson.
Source/WebCore:
* WebCore.exp.in:
Source/WebKit2:
* 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.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (92182 => 92183)
--- trunk/Source/WebCore/ChangeLog 2011-08-02 12:38:12 UTC (rev 92182)
+++ trunk/Source/WebCore/ChangeLog 2011-08-02 13:39:26 UTC (rev 92183)
@@ -1,3 +1,12 @@
+2011-08-02 Amruth Raj <amruth...@motorola.com>
+
+ Custom cursors cause the WebProcess to crash
+ https://bugs.webkit.org/show_bug.cgi?id=64802
+
+ Reviewed by Martin Robinson.
+
+ * WebCore.exp.in:
+
2011-08-02 Pavel Feldman <pfeld...@google.com>
Web Inspector: _normalizeEventTypes (via console's monitorEvents) doesnt handle all events like 'search' and other atypical ones.
Modified: trunk/Source/WebCore/WebCore.exp.in (92182 => 92183)
--- trunk/Source/WebCore/WebCore.exp.in 2011-08-02 12:38:12 UTC (rev 92182)
+++ trunk/Source/WebCore/WebCore.exp.in 2011-08-02 13:39:26 UTC (rev 92183)
@@ -748,6 +748,7 @@
__ZN7WebCore5Frame9nodeImageEPNS_4NodeE
__ZN7WebCore5Frame9scalePageEfRKNS_8IntPointE
__ZN7WebCore5FrameD1Ev
+__ZN7WebCore5Image9nullImageEv
__ZN7WebCore5Image12supportsTypeERKN3WTF6StringE
__ZN7WebCore5Image20loadPlatformResourceEPKc
__ZN7WebCore5Range10selectNodeEPNS_4NodeERi
Modified: trunk/Source/WebKit2/ChangeLog (92182 => 92183)
--- trunk/Source/WebKit2/ChangeLog 2011-08-02 12:38:12 UTC (rev 92182)
+++ trunk/Source/WebKit2/ChangeLog 2011-08-02 13:39:26 UTC (rev 92183)
@@ -1,3 +1,14 @@
+2011-08-02 Amruth Raj <amruth...@motorola.com>
+
+ Custom cursors cause the WebProcess to crash
+ https://bugs.webkit.org/show_bug.cgi?id=64802
+
+ Reviewed by Martin Robinson.
+
+ * 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.
+
2011-08-01 Scott Graham <scot...@chromium.org>
REGRESSION (r39725?): Resources removed from document can not be freed until the document is deleted
Modified: trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp (92182 => 92183)
--- trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp 2011-08-02 12:38:12 UTC (rev 92182)
+++ trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp 2011-08-02 13:39:26 UTC (rev 92183)
@@ -321,6 +321,12 @@
if (cursor.type() != Cursor::Custom)
return;
+ if (cursor.image()->isNull()) {
+ encoder->encodeBool(false); // There is no valid image being encoded.
+ return;
+ }
+
+ encoder->encodeBool(true);
encodeImage(encoder, cursor.image());
encoder->encode(cursor.hotSpot());
}
@@ -344,6 +350,15 @@
return true;
}
+ bool isValidImagePresent;
+ if (!decoder->decode(isValidImagePresent))
+ return false;
+
+ if (!isValidImagePresent) {
+ cursor = Cursor(Image::nullImage(), IntPoint());
+ return true;
+ }
+
RefPtr<Image> image;
if (!decodeImage(decoder, image))
return false;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes