mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:17:35 +00:00
LibJS: Check for DataView in ArrayBuffer.isView()
This commit is contained in:
parent
e992658c12
commit
7a1a91d7f2
1 changed files with 3 additions and 1 deletions
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include <LibJS/Runtime/ArrayBuffer.h>
|
#include <LibJS/Runtime/ArrayBuffer.h>
|
||||||
#include <LibJS/Runtime/ArrayBufferConstructor.h>
|
#include <LibJS/Runtime/ArrayBufferConstructor.h>
|
||||||
|
#include <LibJS/Runtime/DataView.h>
|
||||||
#include <LibJS/Runtime/Error.h>
|
#include <LibJS/Runtime/Error.h>
|
||||||
#include <LibJS/Runtime/GlobalObject.h>
|
#include <LibJS/Runtime/GlobalObject.h>
|
||||||
#include <LibJS/Runtime/TypedArray.h>
|
#include <LibJS/Runtime/TypedArray.h>
|
||||||
|
@ -70,7 +71,8 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayBufferConstructor::is_view)
|
||||||
return Value(false);
|
return Value(false);
|
||||||
if (arg.as_object().is_typed_array())
|
if (arg.as_object().is_typed_array())
|
||||||
return Value(true);
|
return Value(true);
|
||||||
// FIXME: Check for DataView as well
|
if (is<DataView>(arg.as_object()))
|
||||||
|
return Value(true);
|
||||||
return Value(false);
|
return Value(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue