Index: Source/wtf/ArrayBuffer.cpp |
diff --git a/Source/wtf/ArrayBuffer.cpp b/Source/wtf/ArrayBuffer.cpp |
index cfbdc9de1418bca9204a2a7a94e37116d28251ac..3eb4420eef997e067ce1e7ea0fee6ab0474bf5fd 100644 |
--- a/Source/wtf/ArrayBuffer.cpp |
+++ b/Source/wtf/ArrayBuffer.cpp |
@@ -40,6 +40,11 @@ bool ArrayBuffer::transfer(ArrayBufferContents& result) |
return false; |
} |
+ if (m_contents.shared()) { |
+ m_contents.transfer(result); |
+ return true; |
+ } |
+ |
bool allViewsAreNeuterable = true; |
for (ArrayBufferView* i = m_firstView; i; i = i->m_nextView) { |
if (!i->isNeuterable()) |