[tbb-dev] Problems getting a nsIChannel reference
tordevmuc at encambio.com
tordevmuc at encambio.com
Thu Jan 15 01:16:23 UTC 2015
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3527 bytes
Desc: not available
URL: <http://lists.torproject.org/pipermail/tbb-dev/attachments/20150115/1ca243d2/attachment.bin>
More information about the tbb-dev
mailing list