| Index: third_party/WebKit/Source/bindings/modules/v8/SerializedScriptValueForModulesFactory.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/modules/v8/SerializedScriptValueForModulesFactory.cpp b/third_party/WebKit/Source/bindings/modules/v8/SerializedScriptValueForModulesFactory.cpp
|
| index 348e9e882fc5cc47d63e03969a7662893a0136c1..a1ffde32c094d34ee6f2fda4185d9a19142cf827 100644
|
| --- a/third_party/WebKit/Source/bindings/modules/v8/SerializedScriptValueForModulesFactory.cpp
|
| +++ b/third_party/WebKit/Source/bindings/modules/v8/SerializedScriptValueForModulesFactory.cpp
|
| @@ -49,20 +49,17 @@ v8::Local<v8::Value> SerializedScriptValueForModulesFactory::deserialize(
|
| // in |this| being destroyed. Holding a RefPtr ensures we are alive (along
|
| // with our internal data) throughout the operation.
|
| RefPtr<SerializedScriptValue> protect(value);
|
| - String& data = value->data();
|
| - if (!data.impl())
|
| + if (!value->dataLengthInBytes())
|
| return v8::Null(isolate);
|
| static_assert(sizeof(SerializedScriptValueWriter::BufferValueType) == 2,
|
| "BufferValueType should be 2 bytes");
|
| - data.ensure16Bit();
|
| // FIXME: SerializedScriptValue shouldn't use String for its underlying
|
| // storage. Instead, it should use SharedBuffer or Vector<uint8_t>. The
|
| // information stored in m_data isn't even encoded in UTF-16. Instead,
|
| // unicode characters are encoded as UTF-8 with two code units per UChar.
|
| SerializedScriptValueReaderForModules reader(
|
| - reinterpret_cast<const uint8_t*>(data.impl()->characters16()),
|
| - 2 * data.length(), blobInfo, value->blobDataHandles(),
|
| - ScriptState::current(isolate));
|
| + value->data(), value->dataLengthInBytes(), blobInfo,
|
| + value->blobDataHandles(), ScriptState::current(isolate));
|
| ScriptValueDeserializerForModules deserializer(
|
| reader, messagePorts, value->getArrayBufferContentsArray(),
|
| value->getImageBitmapContentsArray());
|
|
|