JSImmutableButterfly should assert m_header is adjacent to the data
[WebKit-https.git] / Source / JavaScriptCore / runtime / JSImmutableButterfly.h
index 0a69ec7..3ace0ad 100644 (file)
@@ -101,12 +101,12 @@ public:
             toButterfly()->contiguous().atUnsafe(index).set(vm, this, value);
     }
 
             toButterfly()->contiguous().atUnsafe(index).set(vm, this, value);
     }
 
-private:
     static constexpr size_t offsetOfData()
     {
         return WTF::roundUpToMultipleOf<sizeof(WriteBarrier<Unknown>)>(sizeof(JSImmutableButterfly));
     }
 
     static constexpr size_t offsetOfData()
     {
         return WTF::roundUpToMultipleOf<sizeof(WriteBarrier<Unknown>)>(sizeof(JSImmutableButterfly));
     }
 
+private:
     static Checked<size_t, RecordOverflow> allocationSize(Checked<size_t, RecordOverflow> numItems)
     {
         return offsetOfData() + numItems * sizeof(WriteBarrier<Unknown>);
     static Checked<size_t, RecordOverflow> allocationSize(Checked<size_t, RecordOverflow> numItems)
     {
         return offsetOfData() + numItems * sizeof(WriteBarrier<Unknown>);