[Pkg-sugar-commit] [sugar-browse-activity] 06/18: fix #10365. Only backport solution from Browse in Sugar 0.90

Jonas Smedegaard dr at jones.dk
Mon Apr 20 09:47:12 UTC 2015


This is an automated email from the git hooks/post-receive script.

js pushed a commit to tag 108.1
in repository sugar-browse-activity.

commit 6f23780232dd340d29dd6d5741eac729948af997
Author: Gonzalo Odiard <godiard at sugarlabs.org>
Date:   Tue Oct 5 08:36:47 2010 -0300

    fix #10365. Only backport solution from Browse in Sugar 0.90
---
 downloadmanager.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/downloadmanager.py b/downloadmanager.py
index e41d06f..dd75783 100644
--- a/downloadmanager.py
+++ b/downloadmanager.py
@@ -308,9 +308,12 @@ def save_link(url, text, owner_document):
         interfaces.nsIRequest.LOAD_BYPASS_CACHE | \
         interfaces.nsIChannel.LOAD_CALL_CONTENT_SNIFFERS
 
-    if _implements_interface(channel, interfaces.nsIHttpChannel):
-        channel.referrer = io_service.newURI(owner_document.documentURI, None,
-                                             None)
+    # HACK: when we QI for nsIHttpChannel on objects that implement
+    # just nsIChannel, pyxpcom gets confused trac #1029
+    if uri.scheme == 'http':
+        if _implements_interface(channel, interfaces.nsIHttpChannel):
+            channel.referrer = io_service.newURI(owner_document.documentURI, 
+                                             None, None)
 
     # kick off the channel with our proxy object as the listener
     listener = xpcom.server.WrapObject(

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-sugar/sugar-browse-activity.git



More information about the pkg-sugar-commit mailing list