]> git.decadent.org.uk Git - videolink.git/commitdiff
Use new version of GetHrefURI on XULRunner 2.0
authorBen Hutchings <ben@decadent.org.uk>
Thu, 3 Mar 2011 03:07:36 +0000 (03:07 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 3 Mar 2011 03:42:20 +0000 (03:42 +0000)
videolink.cpp

index 173b0dc295530bd6b7f1d9dbf5d4e600c7764bc3..a15bbea1bfe125a2cf9c67e152935203a1e3e2a3 100644 (file)
@@ -617,10 +617,17 @@ namespace
            nsCOMPtr<nsIDOMNode> node(*state->links_it);
 
            // Find the link URI and separate any fragment from it.
+           nsCOMPtr<nsIURI> uri_iface;
+#if MOZ_VERSION_GE(2,0,-1)
+           nsCOMPtr<nsIContent> content(do_QueryInterface(node));
+           assert(content);
+           uri_iface = content->GetHrefURI();
+           assert(uri_iface);
+#else
            nsCOMPtr<nsILink> link(do_QueryInterface(node));
            assert(link);
-           nsCOMPtr<nsIURI> uri_iface;
            check(link->GetHrefURI(getter_AddRefs(uri_iface)));
+#endif
            std::string uri, fragment;
            {
                nsCString link_target_ns;