JSArrayBuffer should have its own JSType
authorkeith_miller@apple.com <keith_miller@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Aug 2018 20:33:48 +0000 (20:33 +0000)
committerkeith_miller@apple.com <keith_miller@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Aug 2018 20:33:48 +0000 (20:33 +0000)
https://bugs.webkit.org/show_bug.cgi?id=188231

Reviewed by Saam Barati.

* runtime/JSArrayBuffer.cpp:
(JSC::JSArrayBuffer::createStructure):
* runtime/JSCast.h:
* runtime/JSType.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234468 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/JSArrayBuffer.cpp
Source/JavaScriptCore/runtime/JSCast.h
Source/JavaScriptCore/runtime/JSType.h

index 0e811c4..886b849 100644 (file)
@@ -1,3 +1,15 @@
+2018-08-01  Keith Miller  <keith_miller@apple.com>
+
+        JSArrayBuffer should have its own JSType
+        https://bugs.webkit.org/show_bug.cgi?id=188231
+
+        Reviewed by Saam Barati.
+
+        * runtime/JSArrayBuffer.cpp:
+        (JSC::JSArrayBuffer::createStructure):
+        * runtime/JSCast.h:
+        * runtime/JSType.h:
+
 2018-07-31  Keith Miller  <keith_miller@apple.com>
 
         Unreviewed 32-bit build fix...
index 6f7c527..7843ae3 100644 (file)
@@ -64,7 +64,7 @@ Structure* JSArrayBuffer::createStructure(
     VM& vm, JSGlobalObject* globalObject, JSValue prototype)
 {
     return Structure::create(
-        vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info(),
+        vm, globalObject, prototype, TypeInfo(ArrayBufferType, StructureFlags), info(),
         NonArray);
 }
 
index e53ebc7..a369d48 100644 (file)
@@ -53,6 +53,7 @@ inline To jsCast(JSValue from)
     macro(JSFunction, JSType::JSFunctionType, JSType::JSFunctionType) \
     macro(InternalFunction, JSType::InternalFunctionType, JSType::InternalFunctionType) \
     macro(JSArray, JSType::ArrayType, JSType::DerivedArrayType) \
+    macro(JSArrayBuffer, JSType::ArrayBufferType, JSType::ArrayBufferType) \
     macro(JSArrayBufferView, FirstTypedArrayType, LastTypedArrayType) \
     macro(JSSet, JSType::JSSetType, JSType::JSSetType) \
     macro(JSMap, JSType::JSMapType, JSType::JSMapType) \
index 0cccfac..a8a50cc 100644 (file)
@@ -71,6 +71,8 @@ enum JSType : uint8_t {
     DerivedArrayType,
     // End JSArray types.
 
+    ArrayBufferType,
+
     // Start JSArrayBufferView types. Keep in sync with the order of FOR_EACH_TYPED_ARRAY_TYPE_EXCLUDING_DATA_VIEW.
     Int8ArrayType,
     Uint8ArrayType,