Index: Source/platform/network/FormData.cpp |
diff --git a/Source/platform/network/FormData.cpp b/Source/platform/network/FormData.cpp |
index 29c655aba4176a3236a04312d86fa7a0c43ca46a..0d329416c0002c32963a8a33fc10693387aa685a 100644 |
--- a/Source/platform/network/FormData.cpp |
+++ b/Source/platform/network/FormData.cpp |
@@ -29,6 +29,13 @@ |
namespace blink { |
+bool FormDataElement::isSafeToSendToAnotherThread() const |
+{ |
+ return m_filename.isSafeToSendToAnotherThread() |
+ && m_blobUUID.isSafeToSendToAnotherThread() |
+ && m_fileSystemURL.isSafeToSendToAnotherThread(); |
+} |
+ |
inline FormData::FormData() |
: m_identifier(0) |
, m_containsPasswordData(false) |
@@ -187,4 +194,16 @@ unsigned long long FormData::sizeInBytes() const |
return size; |
} |
+bool FormData::isSafeToSendToAnotherThread() const |
+{ |
+ if (!hasOneRef()) |
+ return false; |
+ size_t n = m_elements.size(); |
+ for (size_t i = 0; i < n; ++i) { |
haraken
2015/08/11 10:58:45
for (auto element : m_elements)
would be better.
hiroshige
2015/08/11 11:20:28
Done.
(I used "auto& element" instead of "auto ele
|
+ if (!m_elements[i].isSafeToSendToAnotherThread()) |
+ return false; |
+ } |
+ return true; |
+} |
+ |
} // namespace blink |