mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 1626447 - Remove nsAutoPtr usage from dom/encoding. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D69118 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
3d161d547c
commit
f3a22ac2e4
@ -10,8 +10,8 @@
|
||||
#include "mozilla/dom/NonRefcountedDOMObject.h"
|
||||
#include "mozilla/dom/TextDecoderBinding.h"
|
||||
#include "mozilla/dom/TypedArray.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "mozilla/Encoding.h"
|
||||
#include "mozilla/UniquePtr.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
@ -28,12 +28,12 @@ class TextDecoder final : public NonRefcountedDOMObject {
|
||||
const nsAString& aEncoding,
|
||||
const TextDecoderOptions& aOptions,
|
||||
ErrorResult& aRv) {
|
||||
nsAutoPtr<TextDecoder> txtDecoder(new TextDecoder());
|
||||
auto txtDecoder = MakeUnique<TextDecoder>();
|
||||
txtDecoder->Init(aEncoding, aOptions, aRv);
|
||||
if (aRv.Failed()) {
|
||||
return nullptr;
|
||||
}
|
||||
return txtDecoder.forget();
|
||||
return txtDecoder.release();
|
||||
}
|
||||
|
||||
TextDecoder() : mFatal(false), mIgnoreBOM(false) {
|
||||
|
Loading…
Reference in New Issue
Block a user