Lines Matching refs:sharedBuffer
36 #include "platform/SharedBuffer.h"
55 RefPtr<SharedBuffer> sharedBuffer = SharedBuffer::create(testData0, strlen(testData0));
56 sharedBuffer->append(testData1, strlen(testData1));
57 sharedBuffer->append(testData2, strlen(testData2));
59 RefPtr<ArrayBuffer> arrayBuffer = sharedBuffer->getAsArrayBuffer();
78 RefPtr<SharedBuffer> sharedBuffer = SharedBuffer::adoptVector(vector0);
79 sharedBuffer->append(vector1);
80 sharedBuffer->append(vector2);
82 RefPtr<ArrayBuffer> arrayBuffer = sharedBuffer->getAsArrayBuffer();
106 RefPtr<SharedBuffer> sharedBuffer = SharedBuffer::create(testData.data(), length);
107 sharedBuffer->append(testData.data(), length);
108 sharedBuffer->append(testData.data(), length);
109 sharedBuffer->append(testData.data(), length);
110 // sharedBuffer must contain data more than segmentSize (= 0x1000) to check copy().
111 ASSERT_EQ(length * 4, sharedBuffer->size());
113 RefPtr<SharedBuffer> clone = sharedBuffer->copy();
115 ASSERT_EQ(0, memcmp(clone->data(), sharedBuffer->data(), clone->size()));
124 RefPtr<SharedBuffer> sharedBuffer = SharedBuffer::create(length);
125 ASSERT_EQ(length, sharedBuffer->size());
130 ASSERT_EQ(length, sharedBuffer->getSomeData(data, 0));
143 RefPtr<SharedBuffer> sharedBuffer = SharedBuffer::createPurgeable(testData.data(), length);
144 ASSERT_EQ(length, sharedBuffer->size());
146 const char* data = sharedBuffer->data();
153 sharedBuffer->append(testData.data() + previousTestDataSize, previousTestDataSize);