Bug 1307331 - Use MOZ_MUST_USE in netwerk/protocol/data r=valentin

MozReview-Commit-ID: IikVyLjQN31

--HG--
extra : rebase_source : 574d28a6534c4a0e0ed92576896d9404e671fa7d
This commit is contained in:
Wei-Cheng Pan 2016-10-03 14:54:01 +08:00
Родитель 9c31ea2777
Коммит d82b36b981
4 изменённых файлов: 11 добавлений и 10 удалений

Просмотреть файл

@ -415,7 +415,7 @@ NeckoParent::RecvPDataChannelConstructor(PDataChannelParent* actor,
const uint32_t& channelId)
{
DataChannelParent* p = static_cast<DataChannelParent*>(actor);
p->Init(channelId);
MOZ_DIAGNOSTIC_ASSERT(p->Init(channelId));
return true;
}

Просмотреть файл

@ -27,7 +27,7 @@ public:
NS_DECL_NSIREQUESTOBSERVER
NS_DECL_NSISTREAMLISTENER
bool Init(const uint32_t& aArgs);
MOZ_MUST_USE bool Init(const uint32_t& aArgs);
private:
~DataChannelParent();

Просмотреть файл

@ -20,8 +20,9 @@ public:
}
protected:
virtual nsresult OpenContentStream(bool async, nsIInputStream **result,
nsIChannel** channel);
virtual MOZ_MUST_USE nsresult OpenContentStream(bool async,
nsIInputStream **result,
nsIChannel** channel);
};
#endif /* nsDataChannel_h___ */

Просмотреть файл

@ -24,18 +24,18 @@ public:
nsDataHandler();
// Define a Create method to be used with a factory:
static nsresult
static MOZ_MUST_USE nsresult
Create(nsISupports* aOuter, const nsIID& aIID, void* *aResult);
// Parse a data: URI and return the individual parts
// (the given spec will temporarily be modified but will be returned
// to the original before returning)
// contentCharset and dataBuffer can be nullptr if they are not needed.
static nsresult ParseURI(nsCString& spec,
nsCString& contentType,
nsCString* contentCharset,
bool& isBase64,
nsCString* dataBuffer);
static MOZ_MUST_USE nsresult ParseURI(nsCString& spec,
nsCString& contentType,
nsCString* contentCharset,
bool& isBase64,
nsCString* dataBuffer);
};
#endif /* nsDataHandler_h___ */