Re: A question about do_QueryInterface()

2015-04-30 Thread ishikawa
On 2015年05月01日 06:30, Seth Fowler wrote: > >> On Apr 30, 2015, at 12:09 PM, Joshua Cranmer 🐧 wrote: >> >> do_QueryInterface is the equivalent of a type-checked downcast, e.g. >> (ClassName)foo in Java. (Regular C++ downcasts are not dynamically >> type-checked). > > do_QueryInterface is, in o

Re: A question about do_QueryInterface()

2015-04-30 Thread ishikawa
On 2015年05月01日 04:09, Joshua Cranmer 🐧 wrote: > On 4/30/2015 1:25 PM, ISHIKAWA, Chiaki wrote: >> * 787 nsCOMPtr inboxInputStream = >> do_QueryInterface(m_outFileStream); >> 788 rv = MsgReopenFileStream(m_tmpDownloadFile, inboxInputStream); >> >> Before, as in the current release

Re: A question about do_QueryInterface()

2015-04-30 Thread Seth Fowler
> On Apr 30, 2015, at 12:09 PM, Joshua Cranmer 🐧 wrote: > > do_QueryInterface is the equivalent of a type-checked downcast, e.g. > (ClassName)foo in Java. (Regular C++ downcasts are not dynamically > type-checked). do_QueryInterface is, in other words, essentially equivalent to dynamic_cast

Re: A question about do_QueryInterface()

2015-04-30 Thread Joshua Cranmer 🐧
On 4/30/2015 1:25 PM, ISHIKAWA, Chiaki wrote: * 787 nsCOMPtr inboxInputStream = do_QueryInterface(m_outFileStream); 788 rv = MsgReopenFileStream(m_tmpDownloadFile, inboxInputStream); Before, as in the current release, m_outFileStream is not buffered. And the code on line 787

Re: A question about do_QueryInterface()

2015-04-30 Thread ISHIKAWA, Chiaki
Thank you for the clarification. On 2015/05/01 3:38, Boris Zbarsky wrote: > On 4/30/15 2:25 PM, ISHIKAWA, Chiaki wrote: >> Is this to be expected? > > Sure. You're taking an _output_ stream and QIing it to > nsI_Input_Stream. > Yes, that is how the original code was written. > It might happen

Re: A question about do_QueryInterface()

2015-04-30 Thread Boris Zbarsky
On 4/30/15 2:25 PM, ISHIKAWA, Chiaki wrote: > Is this to be expected? Sure. You're taking an _output_ stream and QIing it to nsI_Input_Stream. It might happen that some objects implement both interfaces (and looks like nsMsgFileStream does). The object returned by NS_BufferOutputStream does no

A question about do_QueryInterface()

2015-04-30 Thread ISHIKAWA, Chiaki
Lately, I refreshed comm-central thunderbird code and tested my local modification to enable buffering of writing downloaded message to a local mail store. (This is about when one uses POP3. Please bear this in mind. Imap testing is further along.) I noticed a couple of things: (1) File API sema