[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.17-1283-gcf603cf

eric at webkit.org eric at webkit.org
Tue Jan 5 23:56:10 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit d9c13f1efc42954419dc9c2603d6dcdebd54bcfc
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sun Dec 20 09:52:52 2009 +0000

    2009-12-20  Andrei Popescu  <andreip at google.com>
    
            Reviewed by Adam Barth.
    
            [Android] Android needs implementation of setCookies, cookies and cookiesEnabled functions.
            https://bugs.webkit.org/show_bug.cgi?id=32559
    
            Add implementation of the cookie functions.
            Fix a crash caused by dereferencing a 0 MainResourceLoader pointer
            in ResourceHandle::start().
    
            No new tests, this is platform code.
    
            * platform/android/PlatformBridge.h:
            * platform/network/android/AuthenticationChallenge.h: Added.
            * platform/network/android/CookieJarAndroid.cpp: Added.
            (WebCore::setCookies):
            (WebCore::cookies):
            (WebCore::cookiesEnabled):
            * platform/network/android/ResourceHandleAndroid.cpp:
            (WebCore::ResourceHandle::start):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52406 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 940eb3e..e04f638 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,25 @@
+2009-12-20  Andrei Popescu  <andreip at google.com>
+
+        Reviewed by Adam Barth.
+
+        [Android] Android needs implementation of setCookies, cookies and cookiesEnabled functions.
+        https://bugs.webkit.org/show_bug.cgi?id=32559
+
+        Add implementation of the cookie functions.
+        Fix a crash caused by dereferencing a 0 MainResourceLoader pointer
+        in ResourceHandle::start().
+
+        No new tests, this is platform code.
+
+        * platform/android/PlatformBridge.h:
+        * platform/network/android/AuthenticationChallenge.h: Added.
+        * platform/network/android/CookieJarAndroid.cpp: Added.
+        (WebCore::setCookies):
+        (WebCore::cookies):
+        (WebCore::cookiesEnabled):
+        * platform/network/android/ResourceHandleAndroid.cpp:
+        (WebCore::ResourceHandle::start):
+
 2009-12-19  Eric Seidel  <eric at webkit.org>
 
         No review, rolling out r52395.
diff --git a/WebCore/platform/android/PlatformBridge.h b/WebCore/platform/android/PlatformBridge.h
index 977a0fd..bd2a313 100644
--- a/WebCore/platform/android/PlatformBridge.h
+++ b/WebCore/platform/android/PlatformBridge.h
@@ -48,6 +48,11 @@ public:
     // KeyGenerator
     static WTF::Vector<String> getSupportedKeyStrengthList();
     static String getSignedPublicKeyAndChallengeString(unsigned index, const String& challenge, const KURL&);
+    // Cookies
+    static void setCookies(const KURL&, const String& value);
+    static String cookies(const KURL&);
+    static bool cookiesEnabled();
 };
+
 }
 #endif // PlatformBridge_h
diff --git a/WebCore/platform/network/android/AuthenticationChallenge.h b/WebCore/platform/network/android/AuthenticationChallenge.h
new file mode 100644
index 0000000..954bfd8
--- /dev/null
+++ b/WebCore/platform/network/android/AuthenticationChallenge.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2009, The Android Open Source Project
+ * Copyright (C) 2007 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *  * Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *  * Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef AuthenticationChallenge_h
+#define AuthenticationChallenge_h
+
+#include "AuthenticationChallengeBase.h"
+
+namespace WebCore {
+
+class AuthenticationChallenge : public AuthenticationChallengeBase {
+};
+
+}
+
+#endif
diff --git a/WebCore/platform/network/android/CookieJarAndroid.cpp b/WebCore/platform/network/android/CookieJarAndroid.cpp
new file mode 100644
index 0000000..ba4b5dc
--- /dev/null
+++ b/WebCore/platform/network/android/CookieJarAndroid.cpp
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2007, The Android Open Source Project
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *  * Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *  * Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#include "CookieJar.h"
+
+#include "PlatformBridge.h"
+
+namespace WebCore {
+
+void setCookies(Document*, const KURL& url, const String& value)
+{
+    PlatformBridge::setCookies(url, value);
+}
+
+String cookies(const Document*, const KURL& url)
+{
+    return PlatformBridge::cookies(url);
+}
+
+bool cookiesEnabled(const Document*)
+{
+    return PlatformBridge::cookiesEnabled();
+}
+
+}
diff --git a/WebCore/platform/network/android/ResourceHandleAndroid.cpp b/WebCore/platform/network/android/ResourceHandleAndroid.cpp
index 60bfc7b..c4332d0 100644
--- a/WebCore/platform/network/android/ResourceHandleAndroid.cpp
+++ b/WebCore/platform/network/android/ResourceHandleAndroid.cpp
@@ -52,7 +52,7 @@ bool ResourceHandle::start(Frame* frame)
 {
     DocumentLoader* docLoader = frame->loader()->activeDocumentLoader();
     MainResourceLoader* mainLoader = docLoader->mainResourceLoader();
-    bool isMainResource = (mainLoader->handle() == this);
+    bool isMainResource = mainLoader && (mainLoader->handle() == this);
 
     PassRefPtr<ResourceLoaderAndroid> loader = ResourceLoaderAndroid::start(this, d->m_request, frame->loader()->client(), isMainResource, false);
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list