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

Unified Diff: Source/platform/exported/WebThreadSafeData.cpp

Issue 1162773003: [Blob] Dependencies for blob storage testing (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Simplifications Created 5 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
« no previous file with comments | « no previous file | public/platform/WebBlobData.h » ('j') | public/platform/WebBlobData.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/exported/WebThreadSafeData.cpp
diff --git a/Source/platform/exported/WebThreadSafeData.cpp b/Source/platform/exported/WebThreadSafeData.cpp
index 3341eaf423c73dd608fe7a3da9e5945c4aba7bc2..8ac5fd86aed045878f4f58930326f2bed3d9f47c 100644
--- a/Source/platform/exported/WebThreadSafeData.cpp
+++ b/Source/platform/exported/WebThreadSafeData.cpp
@@ -45,6 +45,12 @@ void WebThreadSafeData::assign(const WebThreadSafeData& other)
m_private = other.m_private;
}
+void WebThreadSafeData::assign(const char* data, size_t length)
+{
+ m_private = RawData::create().leakRef();
+ m_private->mutableData()->append(data, length);
+}
+
size_t WebThreadSafeData::size() const
{
if (m_private.isNull())
« no previous file with comments | « no previous file | public/platform/WebBlobData.h » ('j') | public/platform/WebBlobData.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698