Commit d5d684b0 authored by Marijn Kruisselbrink's avatar Marijn Kruisselbrink Committed by Commit Bot

Fix SerializedBlobStructTraits.

The typemap defines this as nullable_is_same_type, but without a SetToNull
method that will result in runtime failures if null is actually passed.

Bug: none
Change-Id: Ife6427121c9f424ab8a2a0c52798f1806b650880
Reviewed-on: https://chromium-review.googlesource.com/956418Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Commit-Queue: Marijn Kruisselbrink <mek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542191}
parent 886289a7
...@@ -17,6 +17,14 @@ template <> ...@@ -17,6 +17,14 @@ template <>
struct PLATFORM_EXPORT struct PLATFORM_EXPORT
StructTraits<blink::mojom::blink::SerializedBlob::DataView, StructTraits<blink::mojom::blink::SerializedBlob::DataView,
scoped_refptr<blink::BlobDataHandle>> { scoped_refptr<blink::BlobDataHandle>> {
static bool IsNull(const scoped_refptr<blink::BlobDataHandle>& input) {
return !input;
}
static void SetToNull(scoped_refptr<blink::BlobDataHandle>* output) {
*output = nullptr;
}
static WTF::String uuid(const scoped_refptr<blink::BlobDataHandle>& input) { static WTF::String uuid(const scoped_refptr<blink::BlobDataHandle>& input) {
return input->Uuid(); return input->Uuid();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment