[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
beidson at apple.com
beidson at apple.com
Wed Dec 22 14:31:00 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 1a033660062fe6996b322e0595dd6d693d4a2be8
Author: beidson at apple.com <beidson at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Oct 12 02:42:39 2010 +0000
Address some of Darin's review feedback in https://bugs.webkit.org/show_bug.cgi?id=47354
that wasn't left till after my original commit.
Reviewed by Darin Adler of the past.
* UIProcess/API/C/WKPage.cpp:
(WKPageCopySessionState): Nuke the temporary variable.
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.h: Fix up function declarations.
* UIProcess/cf/WebPageProxyCF.cpp:
(WebKit::WebPageProxy::sessionStateData): Use sizeof(UInt32) instead of 4.
(WebKit::WebPageProxy::restoreFromSessionStateData): Ditto.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69559 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 2635a90..1d4f723 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,5 +1,22 @@
2010-10-11 Brady Eidson <beidson at apple.com>
+ Reviewed by Darin Adler of the past.
+
+ Address some of Darin's review feedback in https://bugs.webkit.org/show_bug.cgi?id=47354
+ that wasn't left till after my original commit.
+
+ * UIProcess/API/C/WKPage.cpp:
+ (WKPageCopySessionState): Nuke the temporary variable.
+ * UIProcess/API/C/WKPage.h:
+
+ * UIProcess/WebPageProxy.h: Fix up function declarations.
+
+ * UIProcess/cf/WebPageProxyCF.cpp:
+ (WebKit::WebPageProxy::sessionStateData): Use sizeof(UInt32) instead of 4.
+ (WebKit::WebPageProxy::restoreFromSessionStateData): Ditto.
+
+2010-10-11 Brady Eidson <beidson at apple.com>
+
Reviewed by BUILD FIX.
Build fix for Windows in https://bugs.webkit.org/show_bug.cgi?id=47354
diff --git a/WebKit2/UIProcess/API/C/WKPage.cpp b/WebKit2/UIProcess/API/C/WKPage.cpp
index 469d753..d0cc137 100644
--- a/WebKit2/UIProcess/API/C/WKPage.cpp
+++ b/WebKit2/UIProcess/API/C/WKPage.cpp
@@ -160,8 +160,7 @@ WKStringRef WKPageGetSessionHistoryURLValueType()
WKDataRef WKPageCopySessionState(WKPageRef pageRef, void *context, WKPageSessionStateFilterCallback filter)
{
- RefPtr<WebData> state = toImpl(pageRef)->sessionStateData(filter, context);
- return toAPI(state.release().releaseRef());
+ return toAPI(toImpl(pageRef)->sessionStateData(filter, context).releaseRef());
}
void WKPageRestoreFromSessionState(WKPageRef pageRef, WKDataRef sessionStateData)
diff --git a/WebKit2/UIProcess/API/C/WKPage.h b/WebKit2/UIProcess/API/C/WKPage.h
index 22cb807..c658126 100644
--- a/WebKit2/UIProcess/API/C/WKPage.h
+++ b/WebKit2/UIProcess/API/C/WKPage.h
@@ -208,7 +208,7 @@ WK_EXPORT void WKPageTerminate(WKPageRef page);
WK_EXPORT WKStringRef WKPageGetSessionHistoryURLValueType(void);
typedef bool (*WKPageSessionStateFilterCallback)(WKPageRef page, WKStringRef valueType, WKTypeRef value, void* context);
-WK_EXPORT WKDataRef WKPageCopySessionState(WKPageRef page, void *context, WKPageSessionStateFilterCallback urlAllowedCallback);
+WK_EXPORT WKDataRef WKPageCopySessionState(WKPageRef page, void* context, WKPageSessionStateFilterCallback urlAllowedCallback);
WK_EXPORT void WKPageRestoreFromSessionState(WKPageRef page, WKDataRef sessionStateData);
WK_EXPORT double WKPageGetTextZoomFactor(WKPageRef page);
diff --git a/WebKit2/UIProcess/WebPageProxy.h b/WebKit2/UIProcess/WebPageProxy.h
index ab548df..110d0ef 100644
--- a/WebKit2/UIProcess/WebPageProxy.h
+++ b/WebKit2/UIProcess/WebPageProxy.h
@@ -165,7 +165,7 @@ public:
void terminateProcess();
- typedef bool (*WebPageProxySessionStateFilterCallback)(WKPageRef, WKStringRef type, WKTypeRef object, void*);
+ typedef bool (*WebPageProxySessionStateFilterCallback)(WKPageRef, WKStringRef type, WKTypeRef object, void* context);
PassRefPtr<WebData> sessionStateData(WebPageProxySessionStateFilterCallback, void* context) const;
void restoreFromSessionStateData(WebData*);
diff --git a/WebKit2/UIProcess/cf/WebPageProxyCF.cpp b/WebKit2/UIProcess/cf/WebPageProxyCF.cpp
index 386b1c3..45943c3 100644
--- a/WebKit2/UIProcess/cf/WebPageProxyCF.cpp
+++ b/WebKit2/UIProcess/cf/WebPageProxyCF.cpp
@@ -65,7 +65,7 @@ PassRefPtr<WebData> WebPageProxy::sessionStateData(WebPageProxySessionStateFilte
RetainPtr<CFDataRef> stateCFData(AdoptCF, (CFDataRef)CFWriteStreamCopyProperty(writeStream.get(), kCFStreamPropertyDataWritten));
CFIndex length = CFDataGetLength(stateCFData.get());
- Vector<unsigned char> stateVector(length + 4);
+ Vector<unsigned char> stateVector(length + sizeof(UInt32));
// Put the session state version number at the start of the buffer
stateVector.data()[0] = (CurrentSessionStateDataVersion & 0xFF000000) >> 24;
@@ -74,14 +74,14 @@ PassRefPtr<WebData> WebPageProxy::sessionStateData(WebPageProxySessionStateFilte
stateVector.data()[3] = (CurrentSessionStateDataVersion & 0x000000FF);
// Copy in the actual session state data
- CFDataGetBytes(stateCFData.get(), CFRangeMake(0, length), stateVector.data() + 4);
+ CFDataGetBytes(stateCFData.get(), CFRangeMake(0, length), stateVector.data() + sizeof(UInt32));
return WebData::create(stateVector);
}
void WebPageProxy::restoreFromSessionStateData(WebData* webData)
{
- if (!webData || webData->size() < 4)
+ if (!webData || webData->size() < sizeof(UInt32))
return;
const unsigned char* buffer = webData->bytes();
@@ -92,7 +92,7 @@ void WebPageProxy::restoreFromSessionStateData(WebData* webData)
return;
}
- RetainPtr<CFDataRef> data(AdoptCF, CFDataCreate(0, webData->bytes() + 4, webData->size() - 4));
+ RetainPtr<CFDataRef> data(AdoptCF, CFDataCreate(0, webData->bytes() + sizeof(UInt32), webData->size() - sizeof(UInt32)));
CFStringRef propertyListError = 0;
RetainPtr<CFPropertyListRef> propertyList(AdoptCF, CFPropertyListCreateFromXMLData(0, data.get(), kCFPropertyListImmutable, &propertyListError));
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list