[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
jhoneycutt at apple.com
jhoneycutt at apple.com
Wed Dec 22 12:52:58 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit b0773d668fb2109b06e98ecf9cbf1105c0d31339
Author: jhoneycutt at apple.com <jhoneycutt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Sep 1 00:18:07 2010 +0000
Crash when closing a page with a form field when using WebKit2.
Reviewed by Anders Carlsson.
The crash came from accessing a BundlePageFormClient that had been
destroyed. The client was intended to be cleared by a call to
WKBundlePageSetFormClient, but a null check there caused it not to be
cleared.
I fixed this and all of the other WK "set client" functions.
* UIProcess/API/C/WKContext.cpp:
(WKContextSetInjectedBundleClient):
Return early if the caller passed a client with a version not equal to
0.
(WKContextSetHistoryClient):
Ditto.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
Ditto.
(WKPageSetPagePolicyClient):
Ditto.
(WKPageSetPageFormClient):
Ditto.
(WKPageSetPageUIClient):
Ditto.
* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleSetClient):
Ditto.
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageSetEditorClient):
Ditto.
(WKBundlePageSetFormClient):
Ditto.
(WKBundlePageSetLoaderClient):
Ditto.
(WKBundlePageSetUIClient):
Ditto.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66557 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index c62dbf0..63c8c9d 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,47 @@
+2010-08-31 Jon Honeycutt <jhoneycutt at apple.com>
+
+ Crash when closing a page with a form field when using WebKit2.
+
+ Reviewed by Anders Carlsson.
+
+ The crash came from accessing a BundlePageFormClient that had been
+ destroyed. The client was intended to be cleared by a call to
+ WKBundlePageSetFormClient, but a null check there caused it not to be
+ cleared.
+
+ I fixed this and all of the other WK "set client" functions.
+
+ * UIProcess/API/C/WKContext.cpp:
+ (WKContextSetInjectedBundleClient):
+ Return early if the caller passed a client with a version not equal to
+ 0.
+ (WKContextSetHistoryClient):
+ Ditto.
+
+ * UIProcess/API/C/WKPage.cpp:
+ (WKPageSetPageLoaderClient):
+ Ditto.
+ (WKPageSetPagePolicyClient):
+ Ditto.
+ (WKPageSetPageFormClient):
+ Ditto.
+ (WKPageSetPageUIClient):
+ Ditto.
+
+ * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
+ (WKBundleSetClient):
+ Ditto.
+
+ * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
+ (WKBundlePageSetEditorClient):
+ Ditto.
+ (WKBundlePageSetFormClient):
+ Ditto.
+ (WKBundlePageSetLoaderClient):
+ Ditto.
+ (WKBundlePageSetUIClient):
+ Ditto.
+
2010-08-31 Alexey Proskuryakov <ap at apple.com>
Build fix.
diff --git a/WebKit2/UIProcess/API/C/WKContext.cpp b/WebKit2/UIProcess/API/C/WKContext.cpp
index 324e1b0..f19b3b1 100644
--- a/WebKit2/UIProcess/API/C/WKContext.cpp
+++ b/WebKit2/UIProcess/API/C/WKContext.cpp
@@ -74,14 +74,16 @@ WKPreferencesRef WKContextGetPreferences(WKContextRef contextRef)
void WKContextSetInjectedBundleClient(WKContextRef contextRef, const WKContextInjectedBundleClient* wkClient)
{
- if (wkClient && !wkClient->version)
- toWK(contextRef)->initializeInjectedBundleClient(wkClient);
+ if (wkClient && wkClient->version)
+ return;
+ toWK(contextRef)->initializeInjectedBundleClient(wkClient);
}
void WKContextSetHistoryClient(WKContextRef contextRef, const WKContextHistoryClient* wkClient)
{
- if (wkClient && !wkClient->version)
- toWK(contextRef)->initializeHistoryClient(wkClient);
+ if (wkClient && wkClient->version)
+ return;
+ toWK(contextRef)->initializeHistoryClient(wkClient);
}
void WKContextPostMessageToInjectedBundle(WKContextRef contextRef, WKStringRef messageNameRef, WKTypeRef messageBodyRef)
diff --git a/WebKit2/UIProcess/API/C/WKPage.cpp b/WebKit2/UIProcess/API/C/WKPage.cpp
index ee21029..910075c 100644
--- a/WebKit2/UIProcess/API/C/WKPage.cpp
+++ b/WebKit2/UIProcess/API/C/WKPage.cpp
@@ -155,26 +155,30 @@ void WKPageRestoreFromSessionState(WKPageRef pageRef, WKDataRef sessionStateData
void WKPageSetPageLoaderClient(WKPageRef pageRef, const WKPageLoaderClient* wkClient)
{
- if (wkClient && !wkClient->version)
- toWK(pageRef)->initializeLoaderClient(wkClient);
+ if (wkClient && wkClient->version)
+ return;
+ toWK(pageRef)->initializeLoaderClient(wkClient);
}
void WKPageSetPagePolicyClient(WKPageRef pageRef, const WKPagePolicyClient* wkClient)
{
- if (wkClient && !wkClient->version)
- toWK(pageRef)->initializePolicyClient(wkClient);
+ if (wkClient && wkClient->version)
+ return;
+ toWK(pageRef)->initializePolicyClient(wkClient);
}
void WKPageSetPageFormClient(WKPageRef pageRef, const WKPageFormClient* wkClient)
{
- if (wkClient && !wkClient->version)
- toWK(pageRef)->initializeFormClient(wkClient);
+ if (wkClient && wkClient->version)
+ return;
+ toWK(pageRef)->initializeFormClient(wkClient);
}
void WKPageSetPageUIClient(WKPageRef pageRef, const WKPageUIClient * wkClient)
{
- if (wkClient && !wkClient->version)
- toWK(pageRef)->initializeUIClient(wkClient);
+ if (wkClient && wkClient->version)
+ return;
+ toWK(pageRef)->initializeUIClient(wkClient);
}
void WKPageRunJavaScriptInMainFrame(WKPageRef pageRef, WKStringRef scriptRef, void* context, WKPageRunJavaScriptFunction callback)
diff --git a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp
index 8a5606f..25618a3 100644
--- a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp
+++ b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp
@@ -39,8 +39,9 @@ WKTypeID WKBundleGetTypeID()
void WKBundleSetClient(WKBundleRef bundleRef, WKBundleClient * wkClient)
{
- if (wkClient && !wkClient->version)
- toWK(bundleRef)->initializeClient(wkClient);
+ if (wkClient && wkClient->version)
+ return;
+ toWK(bundleRef)->initializeClient(wkClient);
}
void WKBundlePostMessage(WKBundleRef bundleRef, WKStringRef messageNameRef, WKTypeRef messageBodyRef)
diff --git a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp
index 38a6973..ee43536 100644
--- a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp
+++ b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp
@@ -39,26 +39,30 @@ WKTypeID WKBundlePageGetTypeID()
void WKBundlePageSetEditorClient(WKBundlePageRef pageRef, WKBundlePageEditorClient* wkClient)
{
- if (wkClient && !wkClient->version)
- toWK(pageRef)->initializeInjectedBundleEditorClient(wkClient);
+ if (wkClient && wkClient->version)
+ return;
+ toWK(pageRef)->initializeInjectedBundleEditorClient(wkClient);
}
void WKBundlePageSetFormClient(WKBundlePageRef pageRef, WKBundlePageFormClient* wkClient)
{
- if (wkClient && !wkClient->version)
- toWK(pageRef)->initializeInjectedBundleFormClient(wkClient);
+ if (wkClient && wkClient->version)
+ return;
+ toWK(pageRef)->initializeInjectedBundleFormClient(wkClient);
}
void WKBundlePageSetLoaderClient(WKBundlePageRef pageRef, WKBundlePageLoaderClient* wkClient)
{
- if (wkClient && !wkClient->version)
- toWK(pageRef)->initializeInjectedBundleLoaderClient(wkClient);
+ if (wkClient && wkClient->version)
+ return;
+ toWK(pageRef)->initializeInjectedBundleLoaderClient(wkClient);
}
void WKBundlePageSetUIClient(WKBundlePageRef pageRef, WKBundlePageUIClient* wkClient)
{
- if (wkClient && !wkClient->version)
- toWK(pageRef)->initializeInjectedBundleUIClient(wkClient);
+ if (wkClient && wkClient->version)
+ return;
+ toWK(pageRef)->initializeInjectedBundleUIClient(wkClient);
}
WKBundleFrameRef WKBundlePageGetMainFrame(WKBundlePageRef pageRef)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list