On 11/24/14 1:43 AM, Mark Hammond wrote: > * Is Components.returnCode expected to be used when the code throws (as > SessionStore.jsm does) or when the code returns without an exception? > (Or maybe both?) > > * If it is supposed to be used with a normal return, is the change so > GetPendingResult() is called the correct approach to take? (ie, should > I open a bug with that as the patch?)
I've also had this in nsIInterfaceRequestor::getInterface. If this function throws, an exception gets logged and other parts of the networking code treat it as a failure. Setting Components.returnCode and returning null seems to work. The code where we do this is a few years old so I don't know if anything has changed. Personally I'd prefer if the JS component could just throw and not have to use Components.returnCode at all, isn't there a way the caller can catch the exception without it being logged? Philipp _______________________________________________ dev-platform mailing list [email protected] https://lists.mozilla.org/listinfo/dev-platform

