зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1559403 - Implement nsIStringInputStream.setUTF8Data. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D35027 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
7c478fba5b
Коммит
c0b1864c56
|
@ -36,6 +36,16 @@ interface nsIStringInputStream : nsIInputStream
|
|||
*/
|
||||
void setData(in string data, in long dataLen);
|
||||
|
||||
/**
|
||||
* SetUTF8Data - encode input data to UTF-8 and assign it to the input
|
||||
* stream.
|
||||
*
|
||||
* @param data - stream data
|
||||
*
|
||||
* NOTE: This method is meant to be used by JS callers,
|
||||
*/
|
||||
void setUTF8Data(in AUTF8String data);
|
||||
|
||||
/**
|
||||
* NOTE: the following methods are designed to give C++ code added control
|
||||
* over the ownership and lifetime of the stream data. Use with care :-)
|
||||
|
|
|
@ -193,6 +193,11 @@ nsStringInputStream::SetData(const char* aData, int32_t aDataLen) {
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsStringInputStream::SetUTF8Data(const nsACString& aData) {
|
||||
return nsStringInputStream::SetData(aData);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsStringInputStream::AdoptData(char* aData, int32_t aDataLen) {
|
||||
ReentrantMonitorAutoEnter lock(mMon);
|
||||
|
|
Загрузка…
Ссылка в новой задаче