Title: [118443] trunk/Source/WebKit2
- Revision
- 118443
- Author
- [email protected]
- Date
- 2012-05-24 16:47:29 -0700 (Thu, 24 May 2012)
Log Message
Fix the build after http://trac.webkit.org/changeset/118441
Also fix a glaring bug with the new code, will run it by original reviewer retroactively.
* UIProcess/cf/WebBackForwardListCF.cpp:
(WebKit::WebBackForwardList::restoreFromCFDictionaryRepresentation): Fix up the types of the ? operands
to appease super-strict compilers. Don't allow negative indexes (besides the -1 "No index" index).
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (118442 => 118443)
--- trunk/Source/WebKit2/ChangeLog 2012-05-24 23:36:12 UTC (rev 118442)
+++ trunk/Source/WebKit2/ChangeLog 2012-05-24 23:47:29 UTC (rev 118443)
@@ -1,5 +1,14 @@
2012-05-24 Brady Eidson <[email protected]>
+ Fix the build after http://trac.webkit.org/changeset/118441
+ Also fix a glaring bug with the new code, will run it by original reviewer retroactively.
+
+ * UIProcess/cf/WebBackForwardListCF.cpp:
+ (WebKit::WebBackForwardList::restoreFromCFDictionaryRepresentation): Fix up the types of the ? operands
+ to appease super-strict compilers. Don't allow negative indexes (besides the -1 "No index" index).
+
+2012-05-24 Brady Eidson <[email protected]>
+
<rdar://problem/10090764> and https://bugs.webkit.org/show_bug.cgi?id=87417
(Unrepro) Crashes saving session state in WebBackForwardList
Modified: trunk/Source/WebKit2/UIProcess/cf/WebBackForwardListCF.cpp (118442 => 118443)
--- trunk/Source/WebKit2/UIProcess/cf/WebBackForwardListCF.cpp 2012-05-24 23:36:12 UTC (rev 118442)
+++ trunk/Source/WebKit2/UIProcess/cf/WebBackForwardListCF.cpp 2012-05-24 23:47:29 UTC (rev 118443)
@@ -131,14 +131,14 @@
}
CFIndex size = CFArrayGetCount(cfEntries);
- if (currentCFIndex != -1 && currentCFIndex >= size) {
+ if (currentCFIndex < -1 || currentCFIndex >= size ) {
LOG(SessionState, "WebBackForwardList dictionary representation contains an invalid current index (%ld) for the number of entries (%ld)", currentCFIndex, size);
return false;
}
// FIXME: We're relying on currentIndex == -1 to mean the exact same thing as NoCurrentItemIndex (UINT_MAX) in unsigned form.
// That seems implicit and fragile and we should find a better way of representing the NoCurrentItemIndex case.
- uint32_t currentIndex = currentCFIndex == -1 ? NoCurrentItemIndex : currentCFIndex;
+ uint32_t currentIndex = currentCFIndex == -1 ? NoCurrentItemIndex : static_cast<uint32_t>(currentCFIndex);
if (currentIndex == NoCurrentItemIndex && size) {
LOG(SessionState, "WebBackForwardList dictionary representation says there is no current item index, but there is a list of %ld entries - this is bogus", size);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes