[tbb-dev] Problems getting a nsIChannel reference

Arthur D. Edelstein arthuredelstein at gmail.com
Thu Jan 15 02:00:45 UTC 2015

Hi Michael,

Could you add a flag to DataStruct::SetData, like
`DataStruct::SetData (nsISupports* aData, uint32_t aDataLen, bool private)`

and then change calls to SetData to look like
`data.SetData (aData, aDataLen, mPrivateData);`

The nsTransferable::mPrivateData field seems to indicate if the data
came from a private browsing load context:

Best regards,

On Wed, Jan 14, 2015 at 5:16 PM,  <tordevmuc at encambio.com> wrote:
> Hello list,
> Regarding #9701, on Monday's meeting we talked about this method:
>   DataStruct::SetData (nsISupports* aData, uint32_t aDataLen)
>   { // Try to get a nsIChannel here }
> And a helpful comment was 'get the channel from the
> top level chrome window.' I tried a few things:
>   nsCOMPtr<nsIDOMChromeWindow> aWin(do_QueryInterface(aData, &rv));
>   nsCOMPtr<nsILoadContext> aCtx(do_QueryInterface(aData, &rv));
> These calls set rv == NS_NOINTERFACE in every case. Am I missing
> another way to get the top chrome window? Is there a global mTopwin?
> SetData gets called like this:
>   nsCOMPtr<nsISupportsString> aString;
>   SetData (aString, <some-number>)
> By the way, another suggestion to use the JavaScript module
> PrivateBrowsingUtils.jsm requires a nsILoadContext pointer,
> failing with rv == NS_NOINTERFACE in the same way.
> Looks like this is not going to make it in the 4.5 alpha 3 release.
> (No) Cheers,
> Michael
> _______________________________________________
> tbb-dev mailing list
> tbb-dev at lists.torproject.org
> https://lists.torproject.org/cgi-bin/mailman/listinfo/tbb-dev

More information about the tbb-dev mailing list