| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "modules/indexeddb/IDBValue.h" | 5 #include "modules/indexeddb/IDBValue.h" |
| 6 | 6 |
| 7 #include <v8.h> | |
| 8 | |
| 9 #include "bindings/core/v8/SerializedScriptValue.h" | 7 #include "bindings/core/v8/SerializedScriptValue.h" |
| 10 #include "platform/blob/BlobData.h" | 8 #include "platform/blob/BlobData.h" |
| 11 #include "public/platform/WebBlobInfo.h" | 9 #include "public/platform/WebBlobInfo.h" |
| 12 #include "public/platform/modules/indexeddb/WebIDBValue.h" | 10 #include "public/platform/modules/indexeddb/WebIDBValue.h" |
| 11 #include "v8/include/v8.h" |
| 13 #include "wtf/PtrUtil.h" | 12 #include "wtf/PtrUtil.h" |
| 14 | 13 |
| 15 namespace blink { | 14 namespace blink { |
| 16 | 15 |
| 17 IDBValue::IDBValue() = default; | 16 IDBValue::IDBValue() = default; |
| 18 | 17 |
| 19 IDBValue::IDBValue(const WebIDBValue& value, v8::Isolate* isolate) | 18 IDBValue::IDBValue(const WebIDBValue& value, v8::Isolate* isolate) |
| 20 : IDBValue(value.data, value.webBlobInfo, value.primaryKey, value.keyPath) { | 19 : IDBValue(value.data, value.webBlobInfo, value.primaryKey, value.keyPath) { |
| 21 m_isolate = isolate; | 20 m_isolate = isolate; |
| 22 m_externalAllocatedSize = m_data ? static_cast<int64_t>(m_data->size()) : 0l; | 21 m_externalAllocatedSize = m_data ? static_cast<int64_t>(m_data->size()) : 0l; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 | 85 |
| 87 RefPtr<SerializedScriptValue> IDBValue::createSerializedValue() const { | 86 RefPtr<SerializedScriptValue> IDBValue::createSerializedValue() const { |
| 88 return SerializedScriptValue::create(m_data->data(), m_data->size()); | 87 return SerializedScriptValue::create(m_data->data(), m_data->size()); |
| 89 } | 88 } |
| 90 | 89 |
| 91 bool IDBValue::isNull() const { | 90 bool IDBValue::isNull() const { |
| 92 return !m_data.get(); | 91 return !m_data.get(); |
| 93 } | 92 } |
| 94 | 93 |
| 95 } // namespace blink | 94 } // namespace blink |
| OLD | NEW |