[JSC] Array.prototype.reverse modifies JSImmutableButterfly
[WebKit-https.git] / Source / JavaScriptCore / runtime / JSObject.h
index 96ccc04..568b266 100644 (file)
@@ -865,6 +865,12 @@ public:
 
         return ensureArrayStorageSlow(vm);
     }
+
+    void ensureWritable(VM& vm)
+    {
+        if (isCopyOnWrite(indexingMode()))
+            convertFromCopyOnWrite(vm);
+    }
         
     static size_t offsetOfInlineStorage();