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 0e811c4c14d036830517799867114553a970dff6..886b849351751a20b4b130e12d87cad582cb0ea6 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 6f7c527f1321bf55a28378fcd82680c1f3e1b7b8..7843ae3481bcee40f475d47be6b4c6854a22975a 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 e53ebc741a9c8c7d65ead129937b671a5d96fe26..a369d48966262aa1b629f343cb24f1f7463ac5f7 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 0cccfacea45af5f08e12066322e994def8ee0ddf..a8a50ccbb81387917e315ee02dbe9173ded03cb4 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,