| Index: Source/modules/encoding/TextDecoder.cpp
|
| diff --git a/Source/modules/encoding/TextDecoder.cpp b/Source/modules/encoding/TextDecoder.cpp
|
| index 59e5e2603d55acf79e50a07ef99bdde965994d4b..2de005cffaa1dcc2a297ea2e57727f0a8cc0a0e2 100644
|
| --- a/Source/modules/encoding/TextDecoder.cpp
|
| +++ b/Source/modules/encoding/TextDecoder.cpp
|
| @@ -41,13 +41,11 @@ namespace WebCore {
|
|
|
| TextDecoder* TextDecoder::create(const String& label, const Dictionary& options, ExceptionState& exceptionState)
|
| {
|
| - const String& encodingLabel = label.isNull() ? String("utf-8") : label;
|
| -
|
| - WTF::TextEncoding encoding(encodingLabel);
|
| + WTF::TextEncoding encoding(label);
|
| // The replacement encoding is not valid, but the Encoding API also
|
| // rejects aliases of the replacement encoding.
|
| if (!encoding.isValid() || !strcasecmp(encoding.name(), "replacement")) {
|
| - exceptionState.throwTypeError("The encoding label provided ('" + encodingLabel + "') is invalid.");
|
| + exceptionState.throwTypeError("The encoding label provided ('" + label + "') is invalid.");
|
| return 0;
|
| }
|
|
|
|
|