Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(320)

Unified Diff: third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannelTest.cpp

Issue 1964183004: Revert of Move DOMArrayBuffer, DOMArrayBufferViews and DataView to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannelTest.cpp
diff --git a/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannelTest.cpp b/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannelTest.cpp
index b35515d994d4c4a9916120a378ffd4f9830ce4be..f94491934e013e1218731b6381a380f1f652722f 100644
--- a/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannelTest.cpp
+++ b/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannelTest.cpp
@@ -348,7 +348,7 @@
handleClient()->didReceiveFlowControl(handle(), 16);
EXPECT_CALL(*channelClient(), didConsumeBufferedAmount(_)).Times(AnyNumber());
- DOMArrayBuffer* fooBuffer = DOMArrayBuffer::create("foo", 3);
+ RefPtr<DOMArrayBuffer> fooBuffer = DOMArrayBuffer::create("foo", 3);
channel()->send(*fooBuffer, 0, 3);
EXPECT_EQ(3ul, m_sumOfConsumedBufferedAmount);
@@ -368,8 +368,8 @@
handleClient()->didReceiveFlowControl(handle(), 16);
EXPECT_CALL(*channelClient(), didConsumeBufferedAmount(_)).Times(AnyNumber());
- DOMArrayBuffer* foobarBuffer = DOMArrayBuffer::create("foobar", 6);
- DOMArrayBuffer* qbazuxBuffer = DOMArrayBuffer::create("qbazux", 6);
+ RefPtr<DOMArrayBuffer> foobarBuffer = DOMArrayBuffer::create("foobar", 6);
+ RefPtr<DOMArrayBuffer> qbazuxBuffer = DOMArrayBuffer::create("qbazux", 6);
channel()->send(*foobarBuffer, 0, 3);
channel()->send(*foobarBuffer, 3, 3);
channel()->send(*qbazuxBuffer, 1, 3);
@@ -393,19 +393,19 @@
EXPECT_CALL(*channelClient(), didConsumeBufferedAmount(_)).Times(AnyNumber());
{
- DOMArrayBuffer* b = DOMArrayBuffer::create("\0ar", 3);
+ RefPtr<DOMArrayBuffer> b = DOMArrayBuffer::create("\0ar", 3);
channel()->send(*b, 0, 3);
}
{
- DOMArrayBuffer* b = DOMArrayBuffer::create("b\0z", 3);
+ RefPtr<DOMArrayBuffer> b = DOMArrayBuffer::create("b\0z", 3);
channel()->send(*b, 0, 3);
}
{
- DOMArrayBuffer* b = DOMArrayBuffer::create("qu\0", 3);
+ RefPtr<DOMArrayBuffer> b = DOMArrayBuffer::create("qu\0", 3);
channel()->send(*b, 0, 3);
}
{
- DOMArrayBuffer* b = DOMArrayBuffer::create("\0\0\0", 3);
+ RefPtr<DOMArrayBuffer> b = DOMArrayBuffer::create("\0\0\0", 3);
channel()->send(*b, 0, 3);
}
@@ -420,7 +420,7 @@
handleClient()->didReceiveFlowControl(handle(), 16);
EXPECT_CALL(*channelClient(), didConsumeBufferedAmount(_)).Times(AnyNumber());
- DOMArrayBuffer* b = DOMArrayBuffer::create("\xe7\x8b\x90", 3);
+ RefPtr<DOMArrayBuffer> b = DOMArrayBuffer::create("\xe7\x8b\x90", 3);
channel()->send(*b, 0, 3);
EXPECT_EQ(3ul, m_sumOfConsumedBufferedAmount);
@@ -434,7 +434,7 @@
handleClient()->didReceiveFlowControl(handle(), 16);
EXPECT_CALL(*channelClient(), didConsumeBufferedAmount(_)).Times(AnyNumber());
- DOMArrayBuffer* b = DOMArrayBuffer::create("\x80\xff\xe7", 3);
+ RefPtr<DOMArrayBuffer> b = DOMArrayBuffer::create("\x80\xff\xe7", 3);
channel()->send(*b, 0, 3);
EXPECT_EQ(3ul, m_sumOfConsumedBufferedAmount);
@@ -454,7 +454,7 @@
handleClient()->didReceiveFlowControl(handle(), 16);
EXPECT_CALL(*channelClient(), didConsumeBufferedAmount(_)).Times(AnyNumber());
- DOMArrayBuffer* b = DOMArrayBuffer::create("\xe7\x8b\x90\xe7\x8b\x90\xe7\x8b\x90\xe7\x8b\x90\xe7\x8b\x90\xe7\x8b\x90", 18);
+ RefPtr<DOMArrayBuffer> b = DOMArrayBuffer::create("\xe7\x8b\x90\xe7\x8b\x90\xe7\x8b\x90\xe7\x8b\x90\xe7\x8b\x90\xe7\x8b\x90", 18);
channel()->send(*b, 0, 18);
checkpoint.Call(1);

Powered by Google App Engine
This is Rietveld 408576698