mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 903772: Followup to address missed review comment.
This commit is contained in:
parent
bc0a143d85
commit
808fa9d830
@ -88,7 +88,8 @@ TextEncoder::Encode(JSContext* aCx,
|
||||
JSObject* outView = nullptr;
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
buf[dstLen] = '\0';
|
||||
outView = CreateUint8Array(aCx, aObj, buf, dstLen);
|
||||
outView = Uint8Array::Create(aCx, aObj, dstLen,
|
||||
reinterpret_cast<uint8_t*>(buf.get()));
|
||||
if (!outView) {
|
||||
aRv.Throw(NS_ERROR_OUT_OF_MEMORY);
|
||||
return nullptr;
|
||||
|
@ -100,15 +100,6 @@ public:
|
||||
const bool aStream,
|
||||
ErrorResult& aRv);
|
||||
|
||||
protected:
|
||||
JSObject*
|
||||
CreateUint8Array(JSContext* aCx, JS::Handle<JSObject*> aObj,
|
||||
char* aBuf, uint32_t aLen) const
|
||||
{
|
||||
return Uint8Array::Create(aCx, aObj, aLen,
|
||||
reinterpret_cast<uint8_t*>(aBuf));
|
||||
}
|
||||
|
||||
private:
|
||||
nsCString mEncoding;
|
||||
nsCOMPtr<nsIUnicodeEncoder> mEncoder;
|
||||
|
Loading…
Reference in New Issue
Block a user