Modified: trunk/Source/_javascript_Core/ChangeLog (253112 => 253113)
--- trunk/Source/_javascript_Core/ChangeLog 2019-12-04 18:36:15 UTC (rev 253112)
+++ trunk/Source/_javascript_Core/ChangeLog 2019-12-04 18:39:29 UTC (rev 253113)
@@ -1,5 +1,20 @@
2019-12-04 Yusuke Suzuki <[email protected]>
+ [JSC] Remove m_sharingMode field from JSArrayBufferPrototype and make it plain object
+ https://bugs.webkit.org/show_bug.cgi?id=204832
+
+ Reviewed by Saam Barati.
+
+ m_sharingMode field is not necessary. Just remove it and make JSArrayBufferPrototype a plain object.
+
+ * runtime/JSArrayBufferPrototype.cpp:
+ (JSC::JSArrayBufferPrototype::JSArrayBufferPrototype):
+ (JSC::JSArrayBufferPrototype::finishCreation):
+ (JSC::JSArrayBufferPrototype::create):
+ * runtime/JSArrayBufferPrototype.h:
+
+2019-12-04 Yusuke Suzuki <[email protected]>
+
[JSC] Place Wasm cells in IsoSubspace
https://bugs.webkit.org/show_bug.cgi?id=204829
Modified: trunk/Source/_javascript_Core/runtime/JSArrayBufferPrototype.cpp (253112 => 253113)
--- trunk/Source/_javascript_Core/runtime/JSArrayBufferPrototype.cpp 2019-12-04 18:36:15 UTC (rev 253112)
+++ trunk/Source/_javascript_Core/runtime/JSArrayBufferPrototype.cpp 2019-12-04 18:39:29 UTC (rev 253113)
@@ -105,19 +105,18 @@
"ArrayBufferPrototype", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSArrayBufferPrototype)
};
-JSArrayBufferPrototype::JSArrayBufferPrototype(VM& vm, Structure* structure, ArrayBufferSharingMode sharingMode)
+JSArrayBufferPrototype::JSArrayBufferPrototype(VM& vm, Structure* structure)
: Base(vm, structure)
- , m_sharingMode(sharingMode)
{
}
-void JSArrayBufferPrototype::finishCreation(VM& vm, JSGlobalObject* globalObject)
+void JSArrayBufferPrototype::finishCreation(VM& vm, JSGlobalObject* globalObject, ArrayBufferSharingMode sharingMode)
{
Base::finishCreation(vm);
JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->slice, arrayBufferProtoFuncSlice, static_cast<unsigned>(PropertyAttribute::DontEnum), 2);
- putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(vm, arrayBufferSharingModeName(m_sharingMode)), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
- if (m_sharingMode == ArrayBufferSharingMode::Default)
+ putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(vm, arrayBufferSharingModeName(sharingMode)), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
+ if (sharingMode == ArrayBufferSharingMode::Default)
JSC_NATIVE_GETTER_WITHOUT_TRANSITION(vm.propertyNames->byteLength, arrayBufferProtoGetterFuncByteLength, PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
else
JSC_NATIVE_GETTER_WITHOUT_TRANSITION(vm.propertyNames->byteLength, sharedArrayBufferProtoGetterFuncByteLength, PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
@@ -127,8 +126,8 @@
{
JSArrayBufferPrototype* prototype =
new (NotNull, allocateCell<JSArrayBufferPrototype>(vm.heap))
- JSArrayBufferPrototype(vm, structure, sharingMode);
- prototype->finishCreation(vm, globalObject);
+ JSArrayBufferPrototype(vm, structure);
+ prototype->finishCreation(vm, globalObject, sharingMode);
return prototype;
}
Modified: trunk/Source/_javascript_Core/runtime/JSArrayBufferPrototype.h (253112 => 253113)
--- trunk/Source/_javascript_Core/runtime/JSArrayBufferPrototype.h 2019-12-04 18:36:15 UTC (rev 253112)
+++ trunk/Source/_javascript_Core/runtime/JSArrayBufferPrototype.h 2019-12-04 18:39:29 UTC (rev 253113)
@@ -34,8 +34,8 @@
typedef JSNonFinalObject Base;
protected:
- JSArrayBufferPrototype(VM&, Structure*, ArrayBufferSharingMode);
- void finishCreation(VM&, JSGlobalObject*);
+ JSArrayBufferPrototype(VM&, Structure*);
+ void finishCreation(VM&, JSGlobalObject*, ArrayBufferSharingMode);
public:
static JSArrayBufferPrototype* create(VM&, JSGlobalObject*, Structure*, ArrayBufferSharingMode = ArrayBufferSharingMode::Default);
@@ -43,9 +43,6 @@
DECLARE_INFO;
static Structure* createStructure(VM&, JSGlobalObject*, JSValue prototype);
-
-private:
- ArrayBufferSharingMode m_sharingMode;
};
} // namespace JSC