| Index: src/wasm/wasm-js.cc
|
| diff --git a/src/wasm/wasm-js.cc b/src/wasm/wasm-js.cc
|
| index 732751610587bfb64d23563d36f5371e2d746a69..76abca0d44a748b52c0cdbfc105ea1b9ae096543 100644
|
| --- a/src/wasm/wasm-js.cc
|
| +++ b/src/wasm/wasm-js.cc
|
| @@ -56,9 +56,6 @@ RawBuffer GetRawBufferSource(
|
| start = reinterpret_cast<const byte*>(contents.Data());
|
| end = start + contents.ByteLength();
|
|
|
| - if (start == nullptr || end == start) {
|
| - thrower->CompileError("ArrayBuffer argument is empty");
|
| - }
|
| } else if (source->IsTypedArray()) {
|
| // A TypedArray was passed.
|
| Local<TypedArray> array = Local<TypedArray>::Cast(source);
|
| @@ -70,13 +67,12 @@ RawBuffer GetRawBufferSource(
|
| reinterpret_cast<const byte*>(contents.Data()) + array->ByteOffset();
|
| end = start + array->ByteLength();
|
|
|
| - if (start == nullptr || end == start) {
|
| - thrower->CompileError("ArrayBuffer argument is empty");
|
| - }
|
| } else {
|
| thrower->TypeError("Argument 0 must be an ArrayBuffer or Uint8Array");
|
| }
|
| -
|
| + if (start == nullptr || end == start) {
|
| + thrower->CompileError("BufferSource argument is empty");
|
| + }
|
| return {start, end};
|
| }
|
|
|
|
|