[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

hausmann at webkit.org hausmann at webkit.org
Wed Dec 22 13:20:57 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 6ca0c5aec54dbd7f8869c08da1b98dfff05ba595
Author: hausmann at webkit.org <hausmann at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sun Sep 12 13:57:40 2010 +0000

    Fix compilation with V8 and XPath enabled.
    
    Reviewed by Andreas Kling.
    
    V8XPathNSResolver.cpp includes V8XPathNSResolver.h,
    which includes V8DOMWrapper.h as its first header.
    V8DOMWrapper.h then uses V8XPathNSResolver in an inline
    function, and gcc doesn't seem to like this, because
    at this point the type isn't known ("V8XPathNSResolver
    has not been declared"). Forward declaring the type
    doesn't help unfortunately: "incomplete type
    'WebCore::V8XPathNSResolver' used in nested name
    specifier".
    
    To resolve this circular dependency, this patch moves
    the inline function into the .cpp file.
    
    * bindings/v8/V8DOMWrapper.cpp:
    (WebCore::V8DOMWrapper::getXPathNSResolver):
    * bindings/v8/V8DOMWrapper.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67324 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 99d4e1e..8f8fe56 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -2,6 +2,29 @@
 
         Reviewed by Andreas Kling.
 
+        Fix compilation with V8 and XPath enabled.
+
+        V8XPathNSResolver.cpp includes V8XPathNSResolver.h,
+        which includes V8DOMWrapper.h as its first header.
+        V8DOMWrapper.h then uses V8XPathNSResolver in an inline
+        function, and gcc doesn't seem to like this, because
+        at this point the type isn't known ("V8XPathNSResolver
+        has not been declared"). Forward declaring the type
+        doesn't help unfortunately: "incomplete type
+        'WebCore::V8XPathNSResolver' used in nested name
+        specifier".
+
+        To resolve this circular dependency, this patch moves
+        the inline function into the .cpp file.
+
+        * bindings/v8/V8DOMWrapper.cpp:
+        (WebCore::V8DOMWrapper::getXPathNSResolver):
+        * bindings/v8/V8DOMWrapper.h:
+
+2010-09-12  Simon Hausmann  <simon.hausmann at nokia.com>
+
+        Reviewed by Andreas Kling.
+
         [Qt][X11] Fix build with V8 against X11 headers.
 
         Added "True" and "False" to the list of words
diff --git a/WebCore/bindings/v8/V8DOMWrapper.cpp b/WebCore/bindings/v8/V8DOMWrapper.cpp
index 7d7efe5..e7a8142 100644
--- a/WebCore/bindings/v8/V8DOMWrapper.cpp
+++ b/WebCore/bindings/v8/V8DOMWrapper.cpp
@@ -449,4 +449,17 @@ PassRefPtr<EventListener> V8DOMWrapper::getEventListener(v8::Local<v8::Value> va
 #endif
 }
 
+#if ENABLE(XPATH)
+// XPath-related utilities
+RefPtr<XPathNSResolver> V8DOMWrapper::getXPathNSResolver(v8::Handle<v8::Value> value, V8Proxy* proxy)
+{
+    RefPtr<XPathNSResolver> resolver;
+    if (V8XPathNSResolver::HasInstance(value))
+        resolver = V8XPathNSResolver::toNative(v8::Handle<v8::Object>::Cast(value));
+    else if (value->IsObject())
+        resolver = V8CustomXPathNSResolver::create(value->ToObject());
+    return resolver;
+}
+#endif
+
 }  // namespace WebCore
diff --git a/WebCore/bindings/v8/V8DOMWrapper.h b/WebCore/bindings/v8/V8DOMWrapper.h
index ed02743..be42aa4 100644
--- a/WebCore/bindings/v8/V8DOMWrapper.h
+++ b/WebCore/bindings/v8/V8DOMWrapper.h
@@ -93,15 +93,7 @@ namespace WebCore {
 
 #if ENABLE(XPATH)
         // XPath-related utilities
-        static RefPtr<XPathNSResolver> getXPathNSResolver(v8::Handle<v8::Value> value, V8Proxy* proxy = 0)
-        {
-            RefPtr<XPathNSResolver> resolver;
-            if (V8XPathNSResolver::HasInstance(value))
-                resolver = V8XPathNSResolver::toNative(v8::Handle<v8::Object>::Cast(value));
-            else if (value->IsObject())
-                resolver = V8CustomXPathNSResolver::create(value->ToObject());
-            return resolver;
-        }
+        static RefPtr<XPathNSResolver> getXPathNSResolver(v8::Handle<v8::Value> value, V8Proxy* proxy = 0);
 #endif
 
         // Wrap JS node filter in C++.

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list