Title: [125900] trunk/Source/WebKit2
Revision
125900
Author
[email protected]
Date
2012-08-17 07:48:36 -0700 (Fri, 17 Aug 2012)

Log Message

UserMessageEncoder::baseEncode() should ASSERT when attempting to encode a non-shareable image
https://bugs.webkit.org/show_bug.cgi?id=94245

Reviewed by Alexey Proskuryakov.

It's a programming error if a client attempts to encode an image that has an
allocated bitmap, but isn't shareable, so we should assert in this case.

* Shared/UserMessageCoders.h:
(WebKit::UserMessageEncoder::baseEncode):
Assert if we're trying to encode valid non-shareable image.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (125899 => 125900)


--- trunk/Source/WebKit2/ChangeLog	2012-08-17 14:37:47 UTC (rev 125899)
+++ trunk/Source/WebKit2/ChangeLog	2012-08-17 14:48:36 UTC (rev 125900)
@@ -1,3 +1,17 @@
+2012-08-17  Jeff Miller  <[email protected]>
+
+        UserMessageEncoder::baseEncode() should ASSERT when attempting to encode a non-shareable image
+        https://bugs.webkit.org/show_bug.cgi?id=94245
+
+        Reviewed by Alexey Proskuryakov.
+
+        It's a programming error if a client attempts to encode an image that has an
+        allocated bitmap, but isn't shareable, so we should assert in this case.
+
+        * Shared/UserMessageCoders.h:
+        (WebKit::UserMessageEncoder::baseEncode):
+        Assert if we're trying to encode valid non-shareable image.
+
 2012-08-17  Sudarsana Nagineni  <[email protected]>
 
         [EFL] [WK2] Add unit tests for vibration_client_callbacks_set API

Modified: trunk/Source/WebKit2/Shared/UserMessageCoders.h (125899 => 125900)


--- trunk/Source/WebKit2/Shared/UserMessageCoders.h	2012-08-17 14:37:47 UTC (rev 125899)
+++ trunk/Source/WebKit2/Shared/UserMessageCoders.h	2012-08-17 14:48:36 UTC (rev 125900)
@@ -186,6 +186,7 @@
             WebImage* image = static_cast<WebImage*>(m_root);
 
             ShareableBitmap::Handle handle;
+            ASSERT(!image->bitmap() || image->bitmap()->isBackedBySharedMemory());            
             if (!image->bitmap() || !image->bitmap()->isBackedBySharedMemory() || !image->bitmap()->createHandle(handle)) {
                 // Initial false indicates no allocated bitmap or is not shareable.
                 encoder->encode(false);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to