mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-22 02:09:28 +00:00
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:
parent
7c478fba5b
commit
c0b1864c56
@ -36,6 +36,16 @@ interface nsIStringInputStream : nsIInputStream
|
|||||||
*/
|
*/
|
||||||
void setData(in string data, in long dataLen);
|
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
|
* NOTE: the following methods are designed to give C++ code added control
|
||||||
* over the ownership and lifetime of the stream data. Use with care :-)
|
* 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;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NS_IMETHODIMP
|
||||||
|
nsStringInputStream::SetUTF8Data(const nsACString& aData) {
|
||||||
|
return nsStringInputStream::SetData(aData);
|
||||||
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsStringInputStream::AdoptData(char* aData, int32_t aDataLen) {
|
nsStringInputStream::AdoptData(char* aData, int32_t aDataLen) {
|
||||||
ReentrantMonitorAutoEnter lock(mMon);
|
ReentrantMonitorAutoEnter lock(mMon);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user