Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Add privacy context to saveScreenshot() due to Bug 795065. Fixes Issue #99. #102

wants to merge 1 commit into from

2 participants


Fix for Issue #99.

Without "nsILoadContext" in Ci check Songbird dies:

"Could not convert JavaScript argument arg 0 [nsISupports.QueryInterface]"

This looks fine to me. Will land it in a bit.

@whimboo whimboo closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 9 additions and 2 deletions.
  1. +9 −2 extension/chrome/content/screenshot/screenshot.js
11 extension/chrome/content/screenshot/screenshot.js
@@ -145,12 +145,19 @@ function saveScreenshot()
persist.persistFlags = Ci.nsIWebBrowserPersist.PERSIST_FLAGS_REPLACE_EXISTING_FILES;
persist.persistFlags |= Ci.nsIWebBrowserPersist.PERSIST_FLAGS_AUTODETECT_APPLY_CONVERSION;
+ var privacyContext = null;
+ if ("nsILoadContext" in Ci) {
+ privacyContext = window.QueryInterface(Ci.nsIInterfaceRequestor)
+ .getInterface(Ci.nsIWebNavigation)
+ .QueryInterface(Ci.nsILoadContext);
+ }
var tr = Cc[";1"]
- tr.init(source, target, "", null, null, null, persist);
+ tr.init(source, target, "", null, null, null, persist, false);
persist.progressListener = tr;
- persist.saveURI(source, null, null, null, null, file);
+ persist.saveURI(source, null, null, null, null, file, privacyContext);
Something went wrong with that request. Please try again.