Bug 1665614 - Make mozilla::Result work with non-copyable/non-param error types. r=emilio,jandem
Among other things, there were some misuses of std::forward, and GenericErrorResult was (presumably accidentally) instatiated with references as the template argument type, e.g. const nsresult&, which circumvented the check for not calling it with NS_OK in ResultExtensions.h Differential Revision: https://phabricator.services.mozilla.com/D90561
This commit is contained in:
@@ -891,7 +891,7 @@ void ExtensionProtocolHandler::NewSimpleChannel(nsIURI* aURI,
|
||||
nsresult rv = origChannel->AsyncOpen(listener);
|
||||
if (NS_FAILED(rv)) {
|
||||
simpleChannel->Cancel(NS_BINDING_ABORTED);
|
||||
return RequestOrReason(rv);
|
||||
return Err(rv);
|
||||
}
|
||||
return RequestOrReason(origChannel);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user