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

Unified Diff: third_party/WebKit/Source/core/loader/BeaconLoader.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/core/loader/BeaconLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/BeaconLoader.cpp b/third_party/WebKit/Source/core/loader/BeaconLoader.cpp
index 273256479025b009554a8a1c48a8ec97669cfe2f..8e33dfe9cf6e86275dd5ec16590d75926ddc526a 100644
--- a/third_party/WebKit/Source/core/loader/BeaconLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/BeaconLoader.cpp
@@ -35,12 +35,12 @@
protected:
static unsigned long long beaconSize(const String&);
static unsigned long long beaconSize(Blob*);
- static unsigned long long beaconSize(DOMArrayBufferView*);
+ static unsigned long long beaconSize(PassRefPtr<DOMArrayBufferView>);
static unsigned long long beaconSize(FormData*);
static bool serialize(const String&, ResourceRequest&, int, int&);
static bool serialize(Blob*, ResourceRequest&, int, int&);
- static bool serialize(DOMArrayBufferView*, ResourceRequest&, int, int&);
+ static bool serialize(PassRefPtr<DOMArrayBufferView>, ResourceRequest&, int, int&);
static bool serialize(FormData*, ResourceRequest&, int, int&);
};
@@ -110,7 +110,7 @@
return Sender::send(frame, allowance, beaconURL, beacon, payloadLength);
}
-bool BeaconLoader::sendBeacon(LocalFrame* frame, int allowance, const KURL& beaconURL, DOMArrayBufferView* data, int& payloadLength)
+bool BeaconLoader::sendBeacon(LocalFrame* frame, int allowance, const KURL& beaconURL, PassRefPtr<DOMArrayBufferView> data, int& payloadLength)
{
BeaconData<decltype(data)> beacon(data);
return Sender::send(frame, allowance, beaconURL, beacon, payloadLength);
@@ -197,12 +197,12 @@
return true;
}
-unsigned long long Beacon::beaconSize(DOMArrayBufferView* data)
+unsigned long long Beacon::beaconSize(PassRefPtr<DOMArrayBufferView> data)
{
return data->byteLength();
}
-bool Beacon::serialize(DOMArrayBufferView* data, ResourceRequest& request, int, int&)
+bool Beacon::serialize(PassRefPtr<DOMArrayBufferView> data, ResourceRequest& request, int, int&)
{
ASSERT(data);
RefPtr<EncodedFormData> entityBody = EncodedFormData::create(data->baseAddress(), data->byteLength());
« no previous file with comments | « third_party/WebKit/Source/core/loader/BeaconLoader.h ('k') | third_party/WebKit/Source/core/streams/ReadableStreamImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698