[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 11:43:12 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 5ce02624387f4e2f0928a7ad0375c5b8562fc3c6
Author: beidson at apple.com <beidson at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Aug 5 00:06:31 2010 +0000

    2010-08-04  Brady Eidson  <beidson at apple.com>
    
            Reviewed by Sam Weinig.
    
            Change callback APIs to include an Error object in one callback, instead of having a second callback for failure.
            https://bugs.webkit.org/show_bug.cgi?id=43522
    
            This includes adding a WKErrorRef object which - for now - either exists or doesn't.
            In the future, it may contain useful information about the error.
    
            * WebKit2.xcodeproj/project.pbxproj:
            * win/WebKit2.vcproj:
            * win/WebKit2Generated.make:
    
            * Shared/APIObject.h:
            (WebKit::APIObject::):
            * UIProcess/API/C/WKAPICast.h:
            * UIProcess/API/C/WKBase.h:
    
            * Shared/WebError.h: Added.
            (WebKit::WebError::create):
            (WebKit::WebError::WebError):
            (WebKit::WebError::type):
    
            * UIProcess/API/C/WKError.cpp: Added.
            (WKErrorGetTypeID):
            * UIProcess/API/C/WKError.h: Added.
    
            * UIProcess/API/C/WKPage.cpp:
            (WKPageRunJavaScriptInMainFrame):
            (callRunJavaScriptBlockAndRelease):
            (WKPageRunJavaScriptInMainFrame_b):
            (WKPageRenderTreeExternalRepresentation):
            (callRenderTreeExternalRepresentationBlockAndDispose):
            (WKPageRenderTreeExternalRepresentation_b):
            * UIProcess/API/C/WKPage.h:
            * UIProcess/API/C/WKPagePrivate.h:
    
            * UIProcess/GenericCallback.h:
            (WebKit::GenericCallback::create):
            (WebKit::GenericCallback::performCallbackWithReturnValue):
            (WebKit::GenericCallback::invalidate):
            (WebKit::GenericCallback::GenericCallback):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64688 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 89d54c3..2014c66 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,47 @@
+2010-08-04  Brady Eidson  <beidson at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        Change callback APIs to include an Error object in one callback, instead of having a second callback for failure.
+        https://bugs.webkit.org/show_bug.cgi?id=43522
+
+        This includes adding a WKErrorRef object which - for now - either exists or doesn't.
+        In the future, it may contain useful information about the error.
+        
+        * WebKit2.xcodeproj/project.pbxproj:
+        * win/WebKit2.vcproj:
+        * win/WebKit2Generated.make:
+        
+        * Shared/APIObject.h:
+        (WebKit::APIObject::):
+        * UIProcess/API/C/WKAPICast.h:
+        * UIProcess/API/C/WKBase.h:
+        
+        * Shared/WebError.h: Added.
+        (WebKit::WebError::create):
+        (WebKit::WebError::WebError):
+        (WebKit::WebError::type):
+        
+        * UIProcess/API/C/WKError.cpp: Added.
+        (WKErrorGetTypeID):
+        * UIProcess/API/C/WKError.h: Added.
+        
+        * UIProcess/API/C/WKPage.cpp:
+        (WKPageRunJavaScriptInMainFrame):
+        (callRunJavaScriptBlockAndRelease):
+        (WKPageRunJavaScriptInMainFrame_b):
+        (WKPageRenderTreeExternalRepresentation):
+        (callRenderTreeExternalRepresentationBlockAndDispose):
+        (WKPageRenderTreeExternalRepresentation_b):
+        * UIProcess/API/C/WKPage.h:
+        * UIProcess/API/C/WKPagePrivate.h:
+        
+        * UIProcess/GenericCallback.h:
+        (WebKit::GenericCallback::create):
+        (WebKit::GenericCallback::performCallbackWithReturnValue):
+        (WebKit::GenericCallback::invalidate):
+        (WebKit::GenericCallback::GenericCallback):
+
 2010-08-04  Ada Chan  <adachan at apple.com>
 
         Windows build fix        
diff --git a/WebKit2/Shared/APIObject.h b/WebKit2/Shared/APIObject.h
index a1fbb91..8722b93 100644
--- a/WebKit2/Shared/APIObject.h
+++ b/WebKit2/Shared/APIObject.h
@@ -36,6 +36,7 @@ public:
         // Base types
         TypeArray,
         TypeData,
+        TypeError,
         TypeString,
         TypeURL,
         
diff --git a/WebKit2/Shared/WebError.h b/WebKit2/Shared/WebError.h
new file mode 100644
index 0000000..2de2a22
--- /dev/null
+++ b/WebKit2/Shared/WebError.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2010 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:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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 APPLE INC. AND ITS CONTRIBUTORS ``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 APPLE INC. OR ITS 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 WebError_h
+#define WebError_h
+
+#include "APIObject.h"
+
+#include <wtf/PassRefPtr.h>
+
+namespace WebKit {
+
+// WebError - An error type suitable for vending to an API.
+
+class WebError : public APIObject {
+public:
+    static const Type APIType = TypeError;
+
+    static PassRefPtr<WebError> create()
+    {
+        return adoptRef(new WebError);
+    }
+
+private:
+    WebError()
+    {
+    }
+
+    virtual Type type() const { return APIType; }
+};
+
+} // namespace WebKit
+
+#endif // WebError_h
diff --git a/WebKit2/UIProcess/API/C/WKAPICast.h b/WebKit2/UIProcess/API/C/WKAPICast.h
index 7b79b04..d4bb77c 100644
--- a/WebKit2/UIProcess/API/C/WKAPICast.h
+++ b/WebKit2/UIProcess/API/C/WKAPICast.h
@@ -43,6 +43,7 @@ class WebBackForwardList;
 class WebBackForwardListItem;
 class WebContext;
 class WebData;
+class WebError;
 class WebFramePolicyListenerProxy;
 class WebFrameProxy;
 class WebNavigationData;
@@ -75,6 +76,7 @@ template<> struct ImplTypeInfo<WebBackForwardList*>             { typedef WKBack
 template<> struct ImplTypeInfo<WebBackForwardListItem*>         { typedef WKBackForwardListItemRef APIType; };
 template<> struct ImplTypeInfo<WebContext*>                     { typedef WKContextRef APIType; };
 template<> struct ImplTypeInfo<WebData*>                        { typedef WKDataRef APIType; };
+template<> struct ImplTypeInfo<WebError*>                       { typedef WKErrorRef APIType; };
 template<> struct ImplTypeInfo<WebFramePolicyListenerProxy*>    { typedef WKFramePolicyListenerRef APIType; };
 template<> struct ImplTypeInfo<WebFrameProxy*>                  { typedef WKFrameRef APIType; };
 template<> struct ImplTypeInfo<WebNavigationData*>              { typedef WKNavigationDataRef APIType; };
diff --git a/WebKit2/UIProcess/API/C/WKBase.h b/WebKit2/UIProcess/API/C/WKBase.h
index c3e5ac6..90a17ec 100644
--- a/WebKit2/UIProcess/API/C/WKBase.h
+++ b/WebKit2/UIProcess/API/C/WKBase.h
@@ -40,6 +40,7 @@ typedef struct OpaqueWKBackForwardListItemRef* WKBackForwardListItemRef;
 typedef struct OpaqueWKBackForwardListRef* WKBackForwardListRef;
 typedef struct OpaqueWKContext* WKContextRef;
 typedef struct OpaqueWKData* WKDataRef;
+typedef struct OpaqueWKError* WKErrorRef;
 typedef struct OpaqueWKFrame* WKFrameRef;
 typedef struct OpaqueWKFramePolicyListener* WKFramePolicyListenerRef;
 typedef struct OpaqueWKNavigationDataRef* WKNavigationDataRef;
diff --git a/WebKit2/UIProcess/API/C/WKError.cpp b/WebKit2/UIProcess/API/C/WKError.cpp
new file mode 100644
index 0000000..2f47c3e
--- /dev/null
+++ b/WebKit2/UIProcess/API/C/WKError.cpp
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2010 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:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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 APPLE INC. AND ITS CONTRIBUTORS ``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 APPLE INC. OR ITS 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 "WKError.h"
+
+#include "WebError.h"
+#include "WKAPICast.h"
+
+using namespace WebKit;
+
+WKTypeID WKErrorGetTypeID()
+{
+    return toRef(WebError::APIType);
+}
diff --git a/WebKit2/UIProcess/API/C/WKError.h b/WebKit2/UIProcess/API/C/WKError.h
new file mode 100644
index 0000000..14029f6
--- /dev/null
+++ b/WebKit2/UIProcess/API/C/WKError.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2010 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:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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 APPLE INC. AND ITS CONTRIBUTORS ``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 APPLE INC. OR ITS 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 WKError_h
+#define WKError_h
+
+#include <WebKit2/WKBase.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+WK_EXPORT WKTypeID WKErrorGetTypeID();
+
+WK_EXPORT WKErrorRef WKErrorRetain(WKErrorRef error);
+WK_EXPORT void WKErrorRelease(WKErrorRef error);
+
+#ifdef __cplusplus
+}
+#endif
+
+WK_DECLARE_RETAIN_RELEASE_OVERLOADS(WKError)
+
+#endif // WKError_h
diff --git a/WebKit2/UIProcess/API/C/WKPage.cpp b/WebKit2/UIProcess/API/C/WKPage.cpp
index b6fa844..6369c8a 100644
--- a/WebKit2/UIProcess/API/C/WKPage.cpp
+++ b/WebKit2/UIProcess/API/C/WKPage.cpp
@@ -161,53 +161,41 @@ void WKPageSetPageUIClient(WKPageRef pageRef, const WKPageUIClient * wkClient)
         toWK(pageRef)->initializeUIClient(wkClient);
 }
 
-void WKPageRunJavaScriptInMainFrame(WKPageRef pageRef, WKStringRef scriptRef, void* context, WKPageRunJavaScriptFunction callback, WKPageRunJavaScriptDisposeFunction disposeFunction)
+void WKPageRunJavaScriptInMainFrame(WKPageRef pageRef, WKStringRef scriptRef, void* context, WKPageRunJavaScriptFunction callback)
 {
-    toWK(pageRef)->runJavaScriptInMainFrame(toWK(scriptRef)->string(), ScriptReturnValueCallback::create(context, callback, disposeFunction));
+    toWK(pageRef)->runJavaScriptInMainFrame(toWK(scriptRef)->string(), ScriptReturnValueCallback::create(context, callback));
 }
 
 #ifdef __BLOCKS__
-static void callRunJavaScriptBlockAndRelease(WKStringRef resultValue, void* context)
-{
-    WKPageRunJavaScriptBlock block = (WKPageRunJavaScriptBlock)context;
-    block(resultValue);
-    Block_release(block);
-}
-
-static void disposeRunJavaScriptBlock(void* context)
+static void callRunJavaScriptBlockAndRelease(WKStringRef resultValue, WKErrorRef error, void* context)
 {
     WKPageRunJavaScriptBlock block = (WKPageRunJavaScriptBlock)context;
+    block(resultValue, error);
     Block_release(block);
 }
 
 void WKPageRunJavaScriptInMainFrame_b(WKPageRef pageRef, WKStringRef scriptRef, WKPageRunJavaScriptBlock block)
 {
-    WKPageRunJavaScriptInMainFrame(pageRef, scriptRef, Block_copy(block), callRunJavaScriptBlockAndRelease, disposeRunJavaScriptBlock);
+    WKPageRunJavaScriptInMainFrame(pageRef, scriptRef, Block_copy(block), callRunJavaScriptBlockAndRelease);
 }
 #endif
 
-void WKPageRenderTreeExternalRepresentation(WKPageRef pageRef, void* context, WKPageRenderTreeExternalRepresentationFunction callback, WKPageRenderTreeExternalRepresentationDisposeFunction disposeFunction)
+void WKPageRenderTreeExternalRepresentation(WKPageRef pageRef, void* context, WKPageRenderTreeExternalRepresentationFunction callback)
 {
-    toWK(pageRef)->getRenderTreeExternalRepresentation(RenderTreeExternalRepresentationCallback::create(context, callback, disposeFunction));
+    toWK(pageRef)->getRenderTreeExternalRepresentation(RenderTreeExternalRepresentationCallback::create(context, callback));
 }
 
 #ifdef __BLOCKS__
-static void callRenderTreeExternalRepresentationBlockAndDispose(WKStringRef resultValue, void* context)
-{
-    WKPageRenderTreeExternalRepresentationBlock block = (WKPageRenderTreeExternalRepresentationBlock)context;
-    block(resultValue);
-    Block_release(block);
-}
-
-static void disposeRenderTreeExternalRepresentationBlock(void* context)
+static void callRenderTreeExternalRepresentationBlockAndDispose(WKStringRef resultValue, WKErrorRef error, void* context)
 {
     WKPageRenderTreeExternalRepresentationBlock block = (WKPageRenderTreeExternalRepresentationBlock)context;
+    block(resultValue, error);
     Block_release(block);
 }
 
 void WKPageRenderTreeExternalRepresentation_b(WKPageRef pageRef, WKPageRenderTreeExternalRepresentationBlock block)
 {
-    WKPageRenderTreeExternalRepresentation(pageRef, Block_copy(block), callRenderTreeExternalRepresentationBlockAndDispose, disposeRenderTreeExternalRepresentationBlock);
+    WKPageRenderTreeExternalRepresentation(pageRef, Block_copy(block), callRenderTreeExternalRepresentationBlockAndDispose);
 }
 #endif
 
diff --git a/WebKit2/UIProcess/API/C/WKPage.h b/WebKit2/UIProcess/API/C/WKPage.h
index 999eb01..e8bd5fd 100644
--- a/WebKit2/UIProcess/API/C/WKPage.h
+++ b/WebKit2/UIProcess/API/C/WKPage.h
@@ -167,11 +167,10 @@ WK_EXPORT void WKPageSetPageLoaderClient(WKPageRef page, const WKPageLoaderClien
 WK_EXPORT void WKPageSetPagePolicyClient(WKPageRef page, const WKPagePolicyClient* client);
 WK_EXPORT void WKPageSetPageUIClient(WKPageRef page, const WKPageUIClient* client);
 
-typedef void (*WKPageRunJavaScriptFunction)(WKStringRef, void*);
-typedef void (*WKPageRunJavaScriptDisposeFunction)(void*);
-WK_EXPORT void WKPageRunJavaScriptInMainFrame(WKPageRef page, WKStringRef script, void *context, WKPageRunJavaScriptFunction function, WKPageRunJavaScriptDisposeFunction disposeFunction);
+typedef void (*WKPageRunJavaScriptFunction)(WKStringRef, WKErrorRef, void*);
+WK_EXPORT void WKPageRunJavaScriptInMainFrame(WKPageRef page, WKStringRef script, void *context, WKPageRunJavaScriptFunction function);
 #ifdef __BLOCKS__
-typedef void (^WKPageRunJavaScriptBlock)(WKStringRef);
+typedef void (^WKPageRunJavaScriptBlock)(WKStringRef, WKErrorRef);
 WK_EXPORT void WKPageRunJavaScriptInMainFrame_b(WKPageRef page, WKStringRef script, WKPageRunJavaScriptBlock block);
 #endif
 
diff --git a/WebKit2/UIProcess/API/C/WKPagePrivate.h b/WebKit2/UIProcess/API/C/WKPagePrivate.h
index 7664ab8..3bf50c3 100644
--- a/WebKit2/UIProcess/API/C/WKPagePrivate.h
+++ b/WebKit2/UIProcess/API/C/WKPagePrivate.h
@@ -33,12 +33,11 @@
 extern "C" {
 #endif
 
-typedef void (*WKPageRenderTreeExternalRepresentationFunction)(WKStringRef, void*);
-typedef void (*WKPageRenderTreeExternalRepresentationDisposeFunction)(void*);
-WK_EXPORT void WKPageRenderTreeExternalRepresentation(WKPageRef page, void *context, WKPageRenderTreeExternalRepresentationFunction function, WKPageRenderTreeExternalRepresentationDisposeFunction disposeFunction);
+typedef void (*WKPageRenderTreeExternalRepresentationFunction)(WKStringRef, WKErrorRef, void*);
+WK_EXPORT void WKPageRenderTreeExternalRepresentation(WKPageRef page, void *context, WKPageRenderTreeExternalRepresentationFunction function);
 
 #ifdef __BLOCKS__
-typedef void (^WKPageRenderTreeExternalRepresentationBlock)(WKStringRef);
+typedef void (^WKPageRenderTreeExternalRepresentationBlock)(WKStringRef, WKErrorRef);
 WK_EXPORT void WKPageRenderTreeExternalRepresentation_b(WKPageRef page, WKPageRenderTreeExternalRepresentationBlock block);
 #endif
 
diff --git a/WebKit2/UIProcess/GenericCallback.h b/WebKit2/UIProcess/GenericCallback.h
index c3684a8..04a186c 100644
--- a/WebKit2/UIProcess/GenericCallback.h
+++ b/WebKit2/UIProcess/GenericCallback.h
@@ -27,6 +27,8 @@
 #define GenericCallback_h
 
 #include "WKAPICast.h"
+
+#include "WebError.h"
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 
@@ -35,12 +37,11 @@ namespace WebKit {
 template<typename APIReturnValueType, typename InternalReturnValueType = typename APITypeInfo<APIReturnValueType>::ImplType>
 class GenericCallback : public RefCounted<GenericCallback<APIReturnValueType, InternalReturnValueType> > {
 public:
-    typedef void (*CallbackFunction)(APIReturnValueType, void*);
-    typedef void (*CallbackDisposeFunction)(void*);
+    typedef void (*CallbackFunction)(APIReturnValueType, WKErrorRef, void*);
 
-    static PassRefPtr<GenericCallback> create(void* context, CallbackFunction callback, CallbackDisposeFunction disposeCallback)
+    static PassRefPtr<GenericCallback> create(void* context, CallbackFunction callback)
     {
-        return adoptRef(new GenericCallback(context, callback, disposeCallback));
+        return adoptRef(new GenericCallback(context, callback));
     }
 
     ~GenericCallback()
@@ -52,20 +53,19 @@ public:
     {
         ASSERT(m_callback);
 
-        m_callback(toRef(returnValue), m_context);
+        m_callback(toRef(returnValue), 0, m_context);
 
         m_callback = 0;
-        m_disposeCallback = 0;
     }
     
     void invalidate()
     {
         ASSERT(m_callback);
 
-        m_disposeCallback(m_context);
-
+        RefPtr<WebError> error = WebError::create();
+        m_callback(0, toRef(error.get()), m_context);
+        
         m_callback = 0;
-        m_disposeCallback = 0;
     }
 
     uint64_t callbackID() const { return m_callbackID; }
@@ -77,17 +77,15 @@ private:
         return uniqueCallbackID++;
     }
 
-    GenericCallback(void* context, CallbackFunction callback, CallbackDisposeFunction disposeCallback)
+    GenericCallback(void* context, CallbackFunction callback)
         : m_context(context)
         , m_callback(callback)
-        , m_disposeCallback(disposeCallback)
         , m_callbackID(generateCallbackID())
     {
     }
 
     void* m_context;
     CallbackFunction m_callback;
-    CallbackDisposeFunction m_disposeCallback;
     uint64_t m_callbackID;
 };
 
diff --git a/WebKit2/WebKit2.xcodeproj/project.pbxproj b/WebKit2/WebKit2.xcodeproj/project.pbxproj
index 3a911d0..f6266f5 100644
--- a/WebKit2/WebKit2.xcodeproj/project.pbxproj
+++ b/WebKit2/WebKit2.xcodeproj/project.pbxproj
@@ -88,6 +88,9 @@
 		514AF6C81209EE7300A26C97 /* WKData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 514AF6C61209EE7300A26C97 /* WKData.cpp */; };
 		514AF6C91209EE7300A26C97 /* WKData.h in Headers */ = {isa = PBXBuildFile; fileRef = 514AF6C71209EE7300A26C97 /* WKData.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		51578B831209ECEF00A37C4A /* WebData.h in Headers */ = {isa = PBXBuildFile; fileRef = 51578B821209ECEF00A37C4A /* WebData.h */; };
+		516A4A59120A1AB500C05B7F /* WKError.h in Headers */ = {isa = PBXBuildFile; fileRef = 516A4A57120A1AB500C05B7F /* WKError.h */; };
+		516A4A5A120A1AB500C05B7F /* WKError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 516A4A58120A1AB500C05B7F /* WKError.cpp */; };
+		516A4A5D120A2CCD00C05B7F /* WebError.h in Headers */ = {isa = PBXBuildFile; fileRef = 516A4A5B120A2CCD00C05B7F /* WebError.h */; };
 		5DAD729C116FF86200EE5396 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0867D6A5FE840307C02AAC07 /* AppKit.framework */; };
 		6D8A91A611F0EFD100DD01FE /* com.apple.WebProcess.sb in Resources */ = {isa = PBXBuildFile; fileRef = 6D8A91A511F0EFD100DD01FE /* com.apple.WebProcess.sb */; };
 		8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C1666FE841158C02AAC07 /* InfoPlist.strings */; };
@@ -395,6 +398,9 @@
 		514AF6C61209EE7300A26C97 /* WKData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKData.cpp; sourceTree = "<group>"; };
 		514AF6C71209EE7300A26C97 /* WKData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKData.h; sourceTree = "<group>"; };
 		51578B821209ECEF00A37C4A /* WebData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebData.h; sourceTree = "<group>"; };
+		516A4A57120A1AB500C05B7F /* WKError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKError.h; sourceTree = "<group>"; };
+		516A4A58120A1AB500C05B7F /* WKError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKError.cpp; sourceTree = "<group>"; };
+		516A4A5B120A2CCD00C05B7F /* WebError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebError.h; sourceTree = "<group>"; };
 		5DAD7294116FF70B00EE5396 /* WebProcess.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = WebProcess.xcconfig; sourceTree = "<group>"; };
 		5DAD73F1116FF90C00EE5396 /* BaseTarget.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = BaseTarget.xcconfig; sourceTree = "<group>"; };
 		6D8A91A511F0EFD100DD01FE /* com.apple.WebProcess.sb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = com.apple.WebProcess.sb; path = WebProcess/com.apple.WebProcess.sb; sourceTree = "<group>"; };
@@ -788,6 +794,7 @@
 				BCC57161115ADB42001CCAF9 /* NotImplemented.h */,
 				BC1DD7B1114DC396005ADAF3 /* WebCoreArgumentCoders.h */,
 				51578B821209ECEF00A37C4A /* WebData.h */,
+				516A4A5B120A2CCD00C05B7F /* WebError.h */,
 				BC032DAF10F4380F0058C15A /* WebEvent.h */,
 				BC032DB010F4380F0058C15A /* WebEventConversion.cpp */,
 				BC032DB110F4380F0058C15A /* WebEventConversion.h */,
@@ -995,6 +1002,8 @@
 				BCC938E01180DE440085E5FE /* WKContextPrivate.h */,
 				514AF6C61209EE7300A26C97 /* WKData.cpp */,
 				514AF6C71209EE7300A26C97 /* WKData.h */,
+				516A4A58120A1AB500C05B7F /* WKError.cpp */,
+				516A4A57120A1AB500C05B7F /* WKError.h */,
 				BCD01398110FA420003B8A67 /* WKFrame.cpp */,
 				BCD01397110FA420003B8A67 /* WKFrame.h */,
 				BCB9F6A41123DD0D00A137E0 /* WKFramePolicyListener.cpp */,
@@ -1364,6 +1373,8 @@
 				51578B831209ECEF00A37C4A /* WebData.h in Headers */,
 				514AF6C91209EE7300A26C97 /* WKData.h in Headers */,
 				C0E3AA7C1209E83C00A49D01 /* Module.h in Headers */,
+				516A4A59120A1AB500C05B7F /* WKError.h in Headers */,
+				516A4A5D120A2CCD00C05B7F /* WebError.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -1570,6 +1581,7 @@
 				514AF6C81209EE7300A26C97 /* WKData.cpp in Sources */,
 				C0E3AA7A1209E83000A49D01 /* ModuleMac.mm in Sources */,
 				C0E3AA7B1209E83500A49D01 /* Module.cpp in Sources */,
+				516A4A5A120A1AB500C05B7F /* WKError.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
diff --git a/WebKit2/win/WebKit2.vcproj b/WebKit2/win/WebKit2.vcproj
index 808343f..1963be9 100755
--- a/WebKit2/win/WebKit2.vcproj
+++ b/WebKit2/win/WebKit2.vcproj
@@ -981,6 +981,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\UIProcess\WebError.h"
+				>
+			</File>
+			<File
 				RelativePath="..\UIProcess\WebFramePolicyListenerProxy.cpp"
 				>
 			</File>
@@ -1139,6 +1143,14 @@
 						>
 					</File>
 					<File
+						RelativePath="..\UIProcess\API\C\WKError.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\UIProcess\API\C\WKError.h"
+						>
+					</File>
+					<File
 						RelativePath="..\UIProcess\API\C\WKFrame.cpp"
 						>
 					</File>
diff --git a/WebKit2/win/WebKit2Generated.make b/WebKit2/win/WebKit2Generated.make
index 99614e6..b2f9905 100644
--- a/WebKit2/win/WebKit2Generated.make
+++ b/WebKit2/win/WebKit2Generated.make
@@ -9,6 +9,7 @@ all:
     xcopy /y /d "..\UIProcess\API\C\WKContext.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
     xcopy /y /d "..\UIProcess\API\C\WKContextPrivate.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
     xcopy /y /d "..\UIProcess\API\C\WKData.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
+    xcopy /y /d "..\UIProcess\API\C\WKError.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
     xcopy /y /d "..\UIProcess\API\C\WKFrame.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
     xcopy /y /d "..\UIProcess\API\C\WKFramePolicyListener.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
     xcopy /y /d "..\UIProcess\API\C\WKNavigationData.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list