Index: third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.cpp |
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.cpp |
index 5a4771201475d190c3aee72441442f944edba109..9eb724477a63174f60d17f5f8e6e111743d14b3d 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.cpp |
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.cpp |
@@ -360,8 +360,8 @@ String SerializedScriptValueWriter::takeWireString() |
{ |
static_assert(sizeof(BufferValueType) == 2, "BufferValueType should be 2 bytes"); |
fillHole(); |
- String data = String(m_buffer.data(), m_buffer.size()); |
- data.impl()->truncateAssumingIsolated((m_position + 1) / sizeof(BufferValueType)); |
+ ASSERT((m_position + 1) / sizeof(BufferValueType) <= m_buffer.size()); |
+ String data = String(m_buffer.data(), (m_position + 1) / sizeof(BufferValueType)); |
haraken
2015/10/13 07:40:29
return String(...)
hajimehoshi
2015/10/13 07:51:17
Done.
|
return data; |
} |