Title: [148097] trunk/Source/WebCore
- Revision
- 148097
- Author
- [email protected]
- Date
- 2013-04-10 09:13:35 -0700 (Wed, 10 Apr 2013)
Log Message
REGRESSION(r148034): IconDatabase::updateIconRecord crashes with null iconData and iconBitmap.
https://bugs.webkit.org/show_bug.cgi?id=114356
Reviewed by Tim Horton.
When loading an icon fails (for example, when a non-existent URI is
passed to the loader), updateIconRecord can be called with both
iconData and iconBitmap having no data.
This used to be fine before r148034, but causes an assertion now.
No new tests, existing tests such as fast/encoding/mispositioned-meta.html
were crashing.
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::updateIconRecord): Change the ASSERT() to check
for a NAND condition that only fails if both iconData and iconBitmap
are not 0.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (148096 => 148097)
--- trunk/Source/WebCore/ChangeLog 2013-04-10 15:44:29 UTC (rev 148096)
+++ trunk/Source/WebCore/ChangeLog 2013-04-10 16:13:35 UTC (rev 148097)
@@ -1,3 +1,24 @@
+2013-04-10 Raphael Kubo da Costa <[email protected]>
+
+ REGRESSION(r148034): IconDatabase::updateIconRecord crashes with null iconData and iconBitmap.
+ https://bugs.webkit.org/show_bug.cgi?id=114356
+
+ Reviewed by Tim Horton.
+
+ When loading an icon fails (for example, when a non-existent URI is
+ passed to the loader), updateIconRecord can be called with both
+ iconData and iconBitmap having no data.
+
+ This used to be fine before r148034, but causes an assertion now.
+
+ No new tests, existing tests such as fast/encoding/mispositioned-meta.html
+ were crashing.
+
+ * loader/icon/IconDatabase.cpp:
+ (WebCore::IconDatabase::updateIconRecord): Change the ASSERT() to check
+ for a NAND condition that only fails if both iconData and iconBitmap
+ are not 0.
+
2013-04-10 JungJik Lee <[email protected]>
[Texmap] Update a dirty region which is not covered with keepRect.
Modified: trunk/Source/WebCore/loader/icon/IconDatabase.cpp (148096 => 148097)
--- trunk/Source/WebCore/loader/icon/IconDatabase.cpp 2013-04-10 15:44:29 UTC (rev 148096)
+++ trunk/Source/WebCore/loader/icon/IconDatabase.cpp 2013-04-10 16:13:35 UTC (rev 148097)
@@ -537,8 +537,8 @@
void IconDatabase::updateIconRecord(PassRefPtr<SharedBuffer> iconData, PassRefPtr<Image> iconBitmap, const String& iconURL)
{
- // Only one of iconData or iconBitmap should be provided, never both.
- ASSERT(!iconData != !iconBitmap);
+ // Only one of iconData or iconBitmap should be provided, never both. None is also fine.
+ ASSERT(!(!!iconData && !!iconBitmap));
Vector<String> pageURLs;
{
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes