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;