Bug 1796687 Comment 2 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Olli Pettay [:smaug][bugs@pettay.fi] from comment #1)
> This might be a regression from bug 1776209.
> Because of that actor can be more likely null here
> https://searchfox.org/mozilla-central/rev/88f285c5163f73abd209d4f73cfa476660351982/dom/file/ipc/RemoteLazyInputStream.cpp#1389
> That is because of 
> https://searchfox.org/mozilla-central/rev/88f285c5163f73abd209d4f73cfa476660351982/dom/file/ipc/RemoteLazyInputStream.cpp#161 and that
> changed here https://searchfox.org/mozilla-central/rev/88f285c5163f73abd209d4f73cfa476660351982/dom/file/ipc/RemoteLazyInputStreamThread.cpp#71-72

Thanks, yeah, that sounds very likely (it might as well prevent from worse consequences, though). I am just wondering if the right reaction in `RemoteLazyInputStream::IPCRead` would be then to return `nullptr` or to `do_AddRef(new RemoteLazyInputStream());` - I see both as possible failure handling.

IIUC returning `nullptr` would result in `aReader->FatalError("Error deserializing 'inputStream' (RemoteLazyStream) member of 'IPCBlob'");` inside `ParamTraits<mozilla::dom::IPCBlob>::Read` which translates potentially to a crash. So I am inclined to just return a new, empty `RemoteLazyInputStream` here.
(In reply to Olli Pettay [:smaug][bugs@pettay.fi] from comment #1)
> This might be a regression from bug 1776209.
> Because of that actor can be more likely null here
> https://searchfox.org/mozilla-central/rev/88f285c5163f73abd209d4f73cfa476660351982/dom/file/ipc/RemoteLazyInputStream.cpp#1389
> That is because of 
> https://searchfox.org/mozilla-central/rev/88f285c5163f73abd209d4f73cfa476660351982/dom/file/ipc/RemoteLazyInputStream.cpp#161 and that
> changed here https://searchfox.org/mozilla-central/rev/88f285c5163f73abd209d4f73cfa476660351982/dom/file/ipc/RemoteLazyInputStreamThread.cpp#71-72

Thanks, yeah, that sounds very likely (it might as well prevent us from worse consequences, though). I am just wondering if the right reaction in `RemoteLazyInputStream::IPCRead` would be then to return `nullptr` or to `do_AddRef(new RemoteLazyInputStream());` - I see both as possible failure handling.

IIUC returning `nullptr` would result in `aReader->FatalError("Error deserializing 'inputStream' (RemoteLazyStream) member of 'IPCBlob'");` inside `ParamTraits<mozilla::dom::IPCBlob>::Read` which translates potentially to a crash. So I am inclined to just return a new, empty `RemoteLazyInputStream` here.

Back to Bug 1796687 Comment 2