From: Ben Hutchings Date: Thu, 3 Mar 2011 03:07:36 +0000 (+0000) Subject: Use new version of GetHrefURI on XULRunner 2.0 X-Git-Tag: 1.2.11~7 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=1d3245cec0c3e89520fbd5bb1c5dd26f4186ca78;p=videolink.git Use new version of GetHrefURI on XULRunner 2.0 --- diff --git a/videolink.cpp b/videolink.cpp index 173b0dc..a15bbea 100644 --- a/videolink.cpp +++ b/videolink.cpp @@ -617,10 +617,17 @@ namespace nsCOMPtr node(*state->links_it); // Find the link URI and separate any fragment from it. + nsCOMPtr uri_iface; +#if MOZ_VERSION_GE(2,0,-1) + nsCOMPtr content(do_QueryInterface(node)); + assert(content); + uri_iface = content->GetHrefURI(); + assert(uri_iface); +#else nsCOMPtr link(do_QueryInterface(node)); assert(link); - nsCOMPtr uri_iface; check(link->GetHrefURI(getter_AddRefs(uri_iface))); +#endif std::string uri, fragment; { nsCString link_target_ns;