| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -570,6 +570,8 @@ void StringSlice(const FunctionCallbackInfo<Value>& args) { | |||
| 570 | 570 | void DecodeUTF8(const FunctionCallbackInfo<Value>& args) { | |
| 571 | 571 | Environment* env = Environment::GetCurrent(args); // list, flags | |
| 572 | 572 | ||
| 573 | + CHECK_GE(args.Length(), 1); | ||
| 574 | + | ||
| 573 | 575 | if (!(args[0]->IsArrayBuffer() || args[0]->IsSharedArrayBuffer() || | |
| 574 | 576 | args[0]->IsArrayBufferView())) { | |
| 575 | 577 | return node::THROW_ERR_INVALID_ARG_TYPE( | |
@@ -580,7 +582,6 @@ void DecodeUTF8(const FunctionCallbackInfo<Value>& args) { | |||
| 580 | 582 | ||
| 581 | 583 | ArrayBufferViewContents<char> buffer(args[0]); | |
| 582 | 584 | ||
| 583 | - CHECK(args[1]->IsBoolean()); | ||
| 584 | 585 | bool ignore_bom = args[1]->IsTrue(); | |
| 585 | 586 | ||
| 586 | 587 | const char* data = buffer.data(); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments